Speed up fetching artist songs for shuffle and radio

This commit is contained in:
antonio 2023-03-10 16:11:10 +01:00
parent c7dc0a8a31
commit cc7775c986
4 changed files with 26 additions and 34 deletions

View file

@ -36,8 +36,16 @@ public class ArtistPageViewModel extends AndroidViewModel {
return artistRepository.getArtistFullInfo(id);
}
public LiveData<List<Child>> getArtistTopSongList(int count) {
return artistRepository.getTopSongs(artist.getName(), count);
public LiveData<List<Child>> getArtistTopSongList() {
return artistRepository.getTopSongs(artist.getName(), 20);
}
public LiveData<List<Child>> getArtistShuffleList() {
return artistRepository.getRandomSong(artist, 50);
}
public LiveData<List<Child>> getArtistInstantMix() {
return artistRepository.getInstantMix(artist, 20);
}
public ArtistID3 getArtist() {