Added sorting criteria in getDownloadedSong() query

This commit is contained in:
CappielloAntonio 2021-04-26 19:53:43 +02:00
parent ad5ef996e3
commit a26c127356

View file

@ -70,7 +70,7 @@ public interface SongDao {
@Query("SELECT * FROM song WHERE offline = 1 ORDER BY RANDOM() LIMIT :number")
LiveData<List<Song>> getDownloadedSongSample(int number);
@Query("SELECT * FROM song WHERE offline = 1")
@Query("SELECT * FROM song WHERE offline = 1 ORDER BY path, albumName, trackNumber")
LiveData<List<Song>> getDownloadedSong();
@Insert(onConflict = OnConflictStrategy.REPLACE)