Added download UI in home screen

This commit is contained in:
CappielloAntonio 2021-04-26 19:37:05 +02:00
parent e0569c3901
commit bf70863f84
8 changed files with 109 additions and 3 deletions

View file

@ -67,6 +67,12 @@ public interface SongDao {
@Query("SELECT * FROM song WHERE favorite = 1")
LiveData<List<Song>> getFavoriteSong();
@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")
LiveData<List<Song>> getDownloadedSong();
@Insert(onConflict = OnConflictStrategy.REPLACE)
void insertAll(List<Song> songs);