mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 06:27:59 +01:00
Album API now works with versioning system
This commit is contained in:
parent
775de16bfe
commit
e6ee85d6d9
1 changed files with 3 additions and 3 deletions
|
@ -580,7 +580,7 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
|||
*/
|
||||
public function getFilesize($formatName)
|
||||
{
|
||||
$trackFile = $this->trackFiles->where('format', $formatName)->first();
|
||||
$trackFile = $this->trackFiles()->where('format', $formatName)->first();
|
||||
|
||||
if ($trackFile) {
|
||||
return (int) $trackFile->filesize;
|
||||
|
@ -646,9 +646,9 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
|||
}
|
||||
|
||||
|
||||
protected function getMasterTrackFile() : TrackFile
|
||||
public function getMasterTrackFile() : TrackFile
|
||||
{
|
||||
return $this->trackFiles->where('is_master', true)->first();
|
||||
return $this->trackFiles()->where('is_master', true)->first();
|
||||
}
|
||||
|
||||
public function getMasterFormatName() : string
|
||||
|
|
Loading…
Reference in a new issue