Skip to content

Commit

Permalink
convert album_songs to browse
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlan-00 committed May 14, 2024
1 parent d49267b commit 6c30fc7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Module/Api/Method/AlbumSongsMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@ public static function album_songs(array $input, User $user): bool
return false;
}

ob_end_clean();
// songs for all disks
$results = static::getSongRepository()->getByAlbum($album->id);
$browse = Api::getBrowse();
$browse->reset_filters();
$browse->set_type('song');
$browse->set_filter('album', $object_id);
$browse->set_sort('album_disk', 'ASC');

$results = $browse->get_objects();
if (empty($results)) {
Api::empty('song', $input['api_format']);

Expand Down

0 comments on commit 6c30fc7

Please sign in to comment.