Add song/genre sync

This commit is contained in:
Antonio Cappiello 2020-11-24 10:52:00 +01:00
parent b2c269a051
commit 76037e487b
47 changed files with 703 additions and 89 deletions

View file

@ -26,13 +26,17 @@ public class HomeViewModel extends AndroidViewModel {
songRepository = new SongRepository(application);
dicoverSongSample = songRepository.getRandomSample(5);
recentlyPlayedSongSample = songRepository.getListLiveRecentlyPlayedSampleSong();
recentlyAddedSongSample = songRepository.getListLiveRecentlyAddedSampleSong();
mostPlayedSongSample = songRepository.getListLiveMostPlayedSampleSong();
recentlyPlayedSongSample = songRepository.getListLiveRecentlyPlayedSampleSong(20);
recentlyAddedSongSample = songRepository.getListLiveRecentlyAddedSampleSong(20);
mostPlayedSongSample = songRepository.getListLiveMostPlayedSampleSong(20);
}
public List<Song> getDiscoverSongList() {
if(dicoverSongSample.isEmpty()) {
dicoverSongSample = songRepository.getRandomSample(5);
}
return dicoverSongSample;
}