mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Fixed a bad query.
This commit is contained in:
parent
27f19f9dc7
commit
716eff3955
2 changed files with 4 additions and 3 deletions
|
@ -88,8 +88,7 @@ class Album extends Model implements Searchable, Commentable, Favouritable
|
|||
'users' => function($query) {
|
||||
$query->whereUserId(Auth::user()->id);
|
||||
}
|
||||
])
|
||||
->with('users.avatar');
|
||||
]);
|
||||
}
|
||||
|
||||
return !$query;
|
||||
|
|
|
@ -263,6 +263,7 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
|||
|
||||
/**
|
||||
* @param integer $count
|
||||
* @return array
|
||||
*/
|
||||
public static function popular($count, $allowExplicit = false)
|
||||
{
|
||||
|
@ -562,7 +563,6 @@ 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) {
|
||||
|
@ -681,7 +681,9 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $format
|
||||
* @return string
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getFileFor($format)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue