|
|
@ -21,14 +21,14 @@ import javax.script.SimpleBindings |
|
|
|
|
|
|
|
|
|
|
|
@Parcelize |
|
|
|
@Parcelize |
|
|
|
@Entity( |
|
|
|
@Entity( |
|
|
|
tableName = "book_sources", |
|
|
|
tableName = "book_sources", |
|
|
|
indices = [(Index(value = ["bookSourceUrl"], unique = false))] |
|
|
|
indices = [(Index(value = ["bookSourceUrl"], unique = false))] |
|
|
|
) |
|
|
|
) |
|
|
|
data class BookSource( |
|
|
|
data class BookSource( |
|
|
|
var bookSourceName: String = "", // 名称 |
|
|
|
var bookSourceName: String = "", // 名称 |
|
|
|
var bookSourceGroup: String? = null, // 分组 |
|
|
|
var bookSourceGroup: String? = null, // 分组 |
|
|
|
@PrimaryKey |
|
|
|
@PrimaryKey |
|
|
|
var bookSourceUrl: String = "", // 地址,包括 http/https |
|
|
|
var bookSourceUrl: String = "", // 地址,包括 http/https |
|
|
|
var bookSourceType: Int = 0, // 类型,0 文本,1 音频 |
|
|
|
var bookSourceType: Int = 0, // 类型,0 文本,1 音频 |
|
|
|
var bookUrlPattern: String? = null, |
|
|
|
var bookUrlPattern: String? = null, |
|
|
|
var customOrder: Int = 0, // 手动排序编号 |
|
|
|
var customOrder: Int = 0, // 手动排序编号 |
|
|
@ -78,8 +78,8 @@ data class BookSource( |
|
|
|
AppConst.SCRIPT_ENGINE.eval(it.substring(4, it.lastIndexOf("<"))).toString() |
|
|
|
AppConst.SCRIPT_ENGINE.eval(it.substring(4, it.lastIndexOf("<"))).toString() |
|
|
|
else -> it |
|
|
|
else -> it |
|
|
|
} |
|
|
|
} |
|
|
|
GSON.fromJsonObject<Map<String, String>>(header1)?.let { headers -> |
|
|
|
GSON.fromJsonObject<Map<String, String>>(header1)?.let { map -> |
|
|
|
headerMap.putAll(headers) |
|
|
|
headerMap.putAll(map) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return headerMap |
|
|
|
return headerMap |
|
|
|