mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Modified the queue update logic
This commit is contained in:
parent
747431423e
commit
88d8a8c620
4 changed files with 87 additions and 16 deletions
|
|
@ -20,7 +20,7 @@ import com.cappielloantonio.play.model.Server;
|
|||
|
||||
@SuppressLint("RestrictedApi")
|
||||
@Database(
|
||||
version = 26,
|
||||
version = 28,
|
||||
entities = {Queue.class, Server.class, RecentSearch.class, Download.class, Playlist.class}
|
||||
// autoMigrations = { @AutoMigration(from = 23, to = 24) }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import androidx.room.OnConflictStrategy;
|
|||
import androidx.room.Query;
|
||||
|
||||
import com.cappielloantonio.play.model.Queue;
|
||||
import com.cappielloantonio.play.model.Server;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -19,7 +20,10 @@ public interface QueueDao {
|
|||
List<Queue> getAllSimple();
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insertAll(List<Queue> songQueueObject);
|
||||
void insert(Queue songQueueObject);
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insertAll(List<Queue> songQueueObjects);
|
||||
|
||||
@Query("DELETE FROM queue WHERE queue.track_order=:position")
|
||||
void deleteByPosition(int position);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue