Browse Source

History support player and decode - part 1

pull/31/head
FongMi 1 year ago
parent
commit
10605c2743
2 changed files with 11 additions and 0 deletions
  1. +10
    -0
      app/src/main/java/com/fongmi/android/tv/bean/History.java
  2. +1
    -0
      app/src/main/java/com/fongmi/android/tv/db/AppDatabase.java

+ 10
- 0
app/src/main/java/com/fongmi/android/tv/bean/History.java View File

@ -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;
}


+ 1
- 0
app/src/main/java/com/fongmi/android/tv/db/AppDatabase.java View File

@ -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