History support player and decode - part 1

pull/123/head
FongMi 3 years ago
parent bc03765465
commit a08e67e832
  1. 10
      app/src/main/java/com/fongmi/android/tv/bean/History.java
  2. 1
      app/src/main/java/com/fongmi/android/tv/db/AppDatabase.java

@ -31,6 +31,7 @@ public class History {
private long duration;
private float speed;
private int player;
private int decode;
private int scale;
private int cid;
@ -38,6 +39,7 @@ public class History {
this.speed = 1;
this.scale = -1;
this.player = -1;
this.decode = -1;
}
@NonNull
@ -161,6 +163,14 @@ public class History {
this.player = player;
}
public int getDecode() {
return decode;
}
public void setDecode(int decode) {
this.decode = decode;
}
public int getScale() {
return scale;
}

@ -87,6 +87,7 @@ public abstract class AppDatabase extends RoomDatabase {
public void migrate(@NonNull SupportSQLiteDatabase database) {
database.execSQL("ALTER TABLE History ADD COLUMN speed REAL DEFAULT 1 NOT NULL");
database.execSQL("ALTER TABLE History ADD COLUMN player INTEGER DEFAULT -1 NOT NULL");
database.execSQL("ALTER TABLE History ADD COLUMN decode INTEGER DEFAULT -1 NOT NULL");
}
};
}

Loading…
Cancel
Save