新增弹幕转ass工具(未上线至网页)

修改获取直播状态的方法
新增主播uid字段
This commit is contained in:
2022-04-24 20:57:46 +08:00
parent 8dff5bf7bf
commit a1382ff7be
18 changed files with 662 additions and 194 deletions

View File

@@ -30,7 +30,8 @@ public class SQLiteManager {
com.yutou.bilibili.Tools.Log.e(e);
}
}
public void close(){
public void close() {
try {
conn.close();
} catch (SQLException throwables) {
@@ -49,22 +50,24 @@ public class SQLiteManager {
protected SQLiteManager() {
}
private void createSql(JSONObject json){
private void createSql(JSONObject json) {
try {
sql.mkdirs();
sql.delete();
conn = DriverManager.getConnection(url + sql.getAbsolutePath());
}catch (Exception e){
} catch (Exception e) {
com.yutou.bilibili.Tools.Log.e(e);
}
startBatch();
JSONArray array=json.getJSONArray("table");
JSONArray array = json.getJSONArray("table");
for (Object o : array) {
com.yutou.bilibili.Tools.Log.i("创建表:"+((JSONObject)o).getString("name"));
com.yutou.bilibili.Tools.Log.i("创建表:" + ((JSONObject) o).getString("name"));
createSqlOfTable((JSONObject) o);
}
closeBatch();
}
private void createSqlOfTable(JSONObject table) {
String tableName = table.getString("name");
try {
@@ -109,7 +112,11 @@ public class SQLiteManager {
protected void build(JSONObject json) {
try {
Class.forName("org.sqlite.JDBC");
sql = new File("databases" + File.separator + json.getString("file"));
if ("load".equals(json.getString("model"))) {
sql = new File(json.getString("file"));
} else {
sql = new File("databases" + File.separator + json.getString("file"));
}
if (!sql.exists()) {
createSql(json);
} else {