use getRandomSampleWithGenre() rather than getSongsByGenre()

This commit is contained in:
observer 2025-11-09 15:05:05 +00:00
parent 8ce0a82506
commit 35784216bc
No known key found for this signature in database
GPG key ID: 2DE1FE56348E60D0
2 changed files with 29 additions and 2 deletions

View file

@ -37,7 +37,7 @@ public class SongListPageViewModel extends AndroidViewModel {
public int year = 0;
public int maxNumberByYear = 500;
public int maxNumberByGenre = 100;
public int maxNumberByGenre = 500;
public SongListPageViewModel(@NonNull Application application) {
super(application);
@ -51,7 +51,7 @@ public class SongListPageViewModel extends AndroidViewModel {
switch (title) {
case Constants.MEDIA_BY_GENRE:
songList = songRepository.getSongsByGenre(genre.getGenre(), 0);
songList = songRepository.getRandomSampleWithGenre(maxNumberByGenre, 0, 3000, genre.getGenre());
break;
case Constants.MEDIA_BY_ARTIST:
songList = artistRepository.getTopSongs(artist.getName(), 50);