mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 06:27: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')
|
||||
->userDetails()
|
||||
->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();
|
||||
$perPage = 40;
|
||||
|
|
|
@ -76,7 +76,8 @@ class PlaylistsController extends ApiControllerBase
|
|||
'tracks.album',
|
||||
'tracks.album.user')
|
||||
->userDetails()
|
||||
->where('track_count', '>', 0)
|
||||
// A playlist with only one track is not much of a list.
|
||||
->where('track_count', '>', 1)
|
||||
->whereIsPublic(true);
|
||||
|
||||
$this->applyFilters($query);
|
||||
|
|
Loading…
Reference in a new issue