mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-28 23:57:59 +01:00
Don't list albums and playlists with only one track.
This commit is contained in:
parent
9eac8153db
commit
73de10cff4
2 changed files with 4 additions and 2 deletions
|
@ -129,7 +129,8 @@ class AlbumsController extends ApiControllerBase
|
||||||
->with('user', 'user.avatar', 'cover')
|
->with('user', 'user.avatar', 'cover')
|
||||||
->userDetails()
|
->userDetails()
|
||||||
->orderBy('title', 'asc')
|
->orderBy('title', 'asc')
|
||||||
->where('track_count', '>', 0);
|
// An album with only one track is not really an album.
|
||||||
|
->where('track_count', '>', 1);
|
||||||
|
|
||||||
$count = $query->count();
|
$count = $query->count();
|
||||||
$perPage = 40;
|
$perPage = 40;
|
||||||
|
|
|
@ -76,7 +76,8 @@ class PlaylistsController extends ApiControllerBase
|
||||||
'tracks.album',
|
'tracks.album',
|
||||||
'tracks.album.user')
|
'tracks.album.user')
|
||||||
->userDetails()
|
->userDetails()
|
||||||
->where('track_count', '>', 0)
|
// A playlist with only one track is not much of a list.
|
||||||
|
->where('track_count', '>', 1)
|
||||||
->whereIsPublic(true);
|
->whereIsPublic(true);
|
||||||
|
|
||||||
$this->applyFilters($query);
|
$this->applyFilters($query);
|
||||||
|
|
Loading…
Reference in a new issue