mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-03-29 14:27:46 +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) {
|
'users' => function($query) {
|
||||||
$query->whereUserId(Auth::user()->id);
|
$query->whereUserId(Auth::user()->id);
|
||||||
}
|
}
|
||||||
])
|
]);
|
||||||
->with('users.avatar');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return !$query;
|
return !$query;
|
||||||
|
|
|
@ -263,6 +263,7 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param integer $count
|
* @param integer $count
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function popular($count, $allowExplicit = false)
|
public static function popular($count, $allowExplicit = false)
|
||||||
{
|
{
|
||||||
|
@ -562,7 +563,6 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
||||||
*/
|
*/
|
||||||
public function getFilesize($formatName)
|
public function getFilesize($formatName)
|
||||||
{
|
{
|
||||||
// $trackFile = $this->trackFiles()->where('format', $formatName)->first();
|
|
||||||
$trackFile = $this->trackFiles->where('format', $formatName)->first();
|
$trackFile = $this->trackFiles->where('format', $formatName)->first();
|
||||||
|
|
||||||
if ($trackFile) {
|
if ($trackFile) {
|
||||||
|
@ -681,7 +681,9 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param $format
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getFileFor($format)
|
public function getFileFor($format)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue