mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 07:03:35 +00:00
Implemented offline mode functionality
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user