mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 18:31:40 +00:00
Simplified download list UI
This commit is contained in:
parent
3e7d260d6a
commit
d0e62fcae1
9 changed files with 223 additions and 505 deletions
|
|
@ -12,33 +12,9 @@ import java.util.List;
|
|||
|
||||
@Dao
|
||||
public interface DownloadDao {
|
||||
@Query("SELECT * FROM download")
|
||||
@Query("SELECT * FROM download ORDER BY album, track ASC")
|
||||
LiveData<List<Download>> getAll();
|
||||
|
||||
@Query("SELECT * FROM download WHERE playlist_id IS NULL GROUP BY artist LIMIT :size")
|
||||
LiveData<List<Download>> getSampleArtist(int size);
|
||||
|
||||
@Query("SELECT * FROM download WHERE playlist_id IS NULL GROUP BY album LIMIT :size")
|
||||
LiveData<List<Download>> getSampleAlbum(int size);
|
||||
|
||||
@Query("SELECT * FROM download WHERE playlist_id IS NOT NULL GROUP BY playlist_id LIMIT :size")
|
||||
LiveData<List<Download>> getSamplePlaylist(int size);
|
||||
|
||||
@Query("SELECT * FROM download LIMIT :size")
|
||||
LiveData<List<Download>> getSample(int size);
|
||||
|
||||
@Query("SELECT * FROM download WHERE artist=:artistId")
|
||||
LiveData<List<Download>> getAllFromArtist(String artistId);
|
||||
|
||||
@Query("SELECT * FROM download WHERE album=:albumId ORDER BY track ASC")
|
||||
LiveData<List<Download>> getAllFromAlbum(String albumId);
|
||||
|
||||
@Query("SELECT * FROM download WHERE playlist_id=:playlistId")
|
||||
LiveData<List<Download>> getAllFromPlaylist(String playlistId);
|
||||
|
||||
@Query("SELECT * FROM download WHERE playlist_id IS NOT NULL GROUP BY playlist_id")
|
||||
LiveData<List<Download>> getAllPlaylists();
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insert(Download download);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue