mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-01-31 22:53:37 +00:00
Playlists pinned by saving the server information
This commit is contained in:
@@ -20,7 +20,7 @@ import com.cappielloantonio.play.model.Server;
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
@Database(
|
||||
version = 25,
|
||||
version = 26,
|
||||
entities = {Queue.class, Server.class, RecentSearch.class, Download.class, Playlist.class}
|
||||
// autoMigrations = { @AutoMigration(from = 23, to = 24) }
|
||||
)
|
||||
|
||||
@@ -13,8 +13,8 @@ import java.util.List;
|
||||
|
||||
@Dao
|
||||
public interface PlaylistDao {
|
||||
@Query("SELECT * FROM playlist")
|
||||
LiveData<List<Playlist>> getAll();
|
||||
@Query("SELECT * FROM playlist WHERE server=:serverId")
|
||||
LiveData<List<Playlist>> getAll(String serverId);
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insert(Playlist playlist);
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface QueueDao {
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insertAll(List<Queue> songQueueObject);
|
||||
|
||||
@Query("DELETE FROM queue WHERE queue.track_order = :position")
|
||||
@Query("DELETE FROM queue WHERE queue.track_order=:position")
|
||||
void deleteByPosition(int position);
|
||||
|
||||
@Query("DELETE FROM queue")
|
||||
|
||||
Reference in New Issue
Block a user