Finally fixed the music queue and swap logic

This commit is contained in:
CappielloAntonio 2021-12-30 18:13:50 +01:00
parent fc271e8b44
commit 60b741bc11
10 changed files with 134 additions and 140 deletions

View file

@ -6,7 +6,7 @@ import androidx.room.PrimaryKey;
@Entity(tableName = "queue")
public class Queue {
@PrimaryKey(autoGenerate = true)
@PrimaryKey
@ColumnInfo(name = "track_order")
private int trackOrder;
@ -37,7 +37,8 @@ public class Queue {
@ColumnInfo(name = "last_play")
private long lastPlay;
public Queue(String songID, String title, String albumId, String albumName, String artistId, String artistName, String primary, long duration, long lastPlay) {
public Queue(int trackOrder, String songID, String title, String albumId, String albumName, String artistId, String artistName, String primary, long duration, long lastPlay) {
this.trackOrder = trackOrder;
this.songID = songID;
this.title = title;
this.albumId = albumId;