mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Implemented offline mode functionality
This commit is contained in:
parent
658e69dcb9
commit
e0569c3901
21 changed files with 635 additions and 23 deletions
|
|
@ -29,7 +29,7 @@ import com.cappielloantonio.play.model.Song;
|
|||
import com.cappielloantonio.play.model.SongArtistCross;
|
||||
import com.cappielloantonio.play.model.SongGenreCross;
|
||||
|
||||
@Database(entities = {Album.class, Artist.class, Genre.class, Playlist.class, Song.class, RecentSearch.class, SongGenreCross.class, Queue.class, AlbumArtistCross.class, SongArtistCross.class, PlaylistSongCross.class}, version = 11, exportSchema = false)
|
||||
@Database(entities = {Album.class, Artist.class, Genre.class, Playlist.class, Song.class, RecentSearch.class, SongGenreCross.class, Queue.class, AlbumArtistCross.class, SongArtistCross.class, PlaylistSongCross.class}, version = 12, exportSchema = false)
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
private static final String TAG = "AppDatabase";
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ public interface SongDao {
|
|||
@Update
|
||||
void update(Song song);
|
||||
|
||||
@Query("UPDATE song SET offline = 0 WHERE offline == 1")
|
||||
void updateAllOffline();
|
||||
|
||||
@Query("SELECT * FROM song WHERE id IN (:ids)")
|
||||
List<Song> getSongsByID(List<String> ids);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue