fix: shuffle for artists without using getTopSongs

This commit is contained in:
pca006132 2025-10-30 19:57:05 +08:00
parent 77bdd71d79
commit 4b2e963a81
3 changed files with 30 additions and 9 deletions

View file

@ -188,8 +188,6 @@ public class ArtistPageFragment extends Fragment implements ClickCallback {
} else {
if (bind != null)
bind.artistPageTopSongsSector.setVisibility(!songs.isEmpty() ? View.VISIBLE : View.GONE);
if (bind != null)
bind.artistPageShuffleButton.setEnabled(!songs.isEmpty());
songHorizontalAdapter.setItems(songs);
reapplyPlayback();
}

View file

@ -89,6 +89,9 @@ public class ArtistBottomSheetDialog extends BottomSheetDialogFragment implement
ArtistRepository artistRepository = new ArtistRepository();
artistRepository.getInstantMix(artist, 20).observe(getViewLifecycleOwner(), songs -> {
// navidrome may return null for this
if (songs == null)
return;
MusicUtil.ratingFilter(songs);
if (!songs.isEmpty()) {