Added artist's random-song playing

This commit is contained in:
CappielloAntonio 2021-04-18 10:36:15 +02:00
parent 7adeac1e01
commit 9bc48c7800
3 changed files with 65 additions and 2 deletions

View file

@ -42,6 +42,9 @@ public interface SongDao {
@Query("SELECT * FROM song WHERE artistId = :artistID ORDER BY play_count DESC")
LiveData<List<Song>> getArtistTopSongs(String artistID);
@Query("SELECT * FROM song WHERE artistId = :artistID ORDER BY RANDOM() LIMIT :number")
List<Song> getArtistRandomSongs(String artistID, int number);
@Query("SELECT * FROM song WHERE albumId = :albumID ORDER BY trackNumber ASC")
LiveData<List<Song>> getLiveAlbumSong(String albumID);