调整数据库全部走LiveDatabaseServer

This commit is contained in:
2024-11-29 10:42:47 +08:00
parent 8afb8f8f0b
commit 5ae1b474f9
12 changed files with 75 additions and 58 deletions

View File

@@ -14,13 +14,13 @@ public class LiveRoomConfig {
String roomId;
String anchorName;
boolean isLogin;
String rootPath="live";
String rootPath = "live";
LiveDanmuInfo liveInfo;
LiveRoomInfo roomInfo;
public String getLoginUid() {
if("null".equals(loginUid)){
loginUid=null;
if ("null".equals(loginUid)) {
loginUid = null;
}
return loginUid;
}
@@ -42,9 +42,11 @@ public class LiveRoomConfig {
return Objects.hashCode(roomId);
}
public static LiveRoomConfig buildConfig(String roomId){
@Deprecated
public static LiveRoomConfig buildConfigTmp(String roomId) {
BiliLiveConfigDatabase database = new BiliLiveConfigDatabase();
LiveConfigDatabaseBean bean = database.getConfig(new String(roomId));
LiveConfigDatabaseBean bean = database.getConfig(roomId);
database.close();
LiveRoomConfig config = new LiveRoomConfig();
config.setLoginUid(bean.getRecordUid());

View File

@@ -271,7 +271,7 @@ public class BiliLiveDatabase extends SQLiteManager {
}
public static void main(String[] args) {
BiliLiveDatabase biliLiveDatabase = new BiliLiveDatabase(LiveRoomConfig.buildConfig("33989"));
BiliLiveDatabase biliLiveDatabase = new BiliLiveDatabase(LiveRoomConfig.buildConfigTmp("33989"));
// biliLiveDatabase.resetSQL();
biliLiveDatabase.resetData();