adjust through upgrade testing

pull/1282/head
Jason Yao 3 years ago
parent af78cc4040
commit 57a23999d6
  1. 8
      app/schemas/io.legado.app.data.AppDatabase/38.json
  2. 4
      app/src/main/java/io/legado/app/data/entities/BookSource.kt
  3. 2
      app/src/main/java/io/legado/app/help/BookSourceAnalyzer.kt

@ -2,7 +2,7 @@
"formatVersion": 1, "formatVersion": 1,
"database": { "database": {
"version": 38, "version": 38,
"identityHash": "5f9007af3ac118c8c2dc587723475405", "identityHash": "5211699415b40f58b06d4136d14173d1",
"entities": [ "entities": [
{ {
"tableName": "books", "tableName": "books",
@ -254,7 +254,7 @@
}, },
{ {
"tableName": "book_sources", "tableName": "book_sources",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookSourceName` TEXT NOT NULL, `bookSourceGroup` TEXT, `bookSourceUrl` TEXT NOT NULL, `bookSourceType` INTEGER NOT NULL, `bookUrlPattern` TEXT, `concurrentRate` TEXT, `customOrder` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `enabledExplore` INTEGER NOT NULL, `header` TEXT, `loginUrl` TEXT, `loginUi` TEXT, `loginCheckJs` TEXT, `bookSourceComment` TEXT, `lastUpdateTime` INTEGER NOT NULL, `respondTime` INTEGER, `weight` INTEGER NOT NULL, `exploreUrl` TEXT, `ruleExplore` TEXT, `searchUrl` TEXT, `ruleSearch` TEXT, `ruleBookInfo` TEXT, `ruleToc` TEXT, `ruleContent` TEXT, PRIMARY KEY(`bookSourceUrl`))", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookSourceName` TEXT NOT NULL, `bookSourceGroup` TEXT, `bookSourceUrl` TEXT NOT NULL, `bookSourceType` INTEGER NOT NULL, `bookUrlPattern` TEXT, `concurrentRate` TEXT, `customOrder` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `enabledExplore` INTEGER NOT NULL, `header` TEXT, `loginUrl` TEXT, `loginUi` TEXT, `loginCheckJs` TEXT, `bookSourceComment` TEXT, `lastUpdateTime` INTEGER NOT NULL, `respondTime` INTEGER NOT NULL, `weight` INTEGER NOT NULL, `exploreUrl` TEXT, `ruleExplore` TEXT, `searchUrl` TEXT, `ruleSearch` TEXT, `ruleBookInfo` TEXT, `ruleToc` TEXT, `ruleContent` TEXT, PRIMARY KEY(`bookSourceUrl`))",
"fields": [ "fields": [
{ {
"fieldPath": "bookSourceName", "fieldPath": "bookSourceName",
@ -350,7 +350,7 @@
"fieldPath": "respondTime", "fieldPath": "respondTime",
"columnName": "respondTime", "columnName": "respondTime",
"affinity": "INTEGER", "affinity": "INTEGER",
"notNull": false "notNull": true
}, },
{ {
"fieldPath": "weight", "fieldPath": "weight",
@ -1459,7 +1459,7 @@
"views": [], "views": [],
"setupQueries": [ "setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5f9007af3ac118c8c2dc587723475405')" "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5211699415b40f58b06d4136d14173d1')"
] ]
} }
} }

@ -29,11 +29,11 @@ data class BookSource(
var enabledExplore: Boolean = true, // 启用发现 var enabledExplore: Boolean = true, // 启用发现
override var header: String? = null, // 请求头 override var header: String? = null, // 请求头
override var loginUrl: String? = null, // 登录地址 override var loginUrl: String? = null, // 登录地址
var loginUi: List<RowUi>? = null, //登录UI var loginUi: List<RowUi>? = null, //登录UI
var loginCheckJs: String? = null, //登录检测js var loginCheckJs: String? = null, //登录检测js
var bookSourceComment: String? = null, // 注释 var bookSourceComment: String? = null, // 注释
var lastUpdateTime: Long = 0, // 最后更新时间,用于排序 var lastUpdateTime: Long = 0, // 最后更新时间,用于排序
var respondTime: Long? = 180000L, // 响应时间,用于排序 var respondTime: Long = 180000L, // 响应时间,用于排序
var weight: Int = 0, // 智能排序的权重 var weight: Int = 0, // 智能排序的权重
var exploreUrl: String? = null, // 发现url var exploreUrl: String? = null, // 发现url
var ruleExplore: ExploreRule? = null, // 发现规则 var ruleExplore: ExploreRule? = null, // 发现规则

@ -161,7 +161,7 @@ object BookSourceAnalyzer {
var loginCheckJs: String? = null, //登录检测js var loginCheckJs: String? = null, //登录检测js
var bookSourceComment: String? = "", //书源注释 var bookSourceComment: String? = "", //书源注释
var lastUpdateTime: Long = 0, // 最后更新时间,用于排序 var lastUpdateTime: Long = 0, // 最后更新时间,用于排序
var respondTime: Long? = 180000L, // 响应时间,用于排序 var respondTime: Long = 180000L, // 响应时间,用于排序
var weight: Int = 0, // 智能排序的权重 var weight: Int = 0, // 智能排序的权重
var exploreUrl: String? = null, // 发现url var exploreUrl: String? = null, // 发现url
var ruleExplore: Any? = null, // 发现规则 var ruleExplore: Any? = null, // 发现规则

Loading…
Cancel
Save