|
|
|
@ -20,31 +20,56 @@ import timber.log.Timber |
|
|
|
|
indices = [(Index(value = ["bookSourceUrl"], unique = false))] |
|
|
|
|
) |
|
|
|
|
data class BookSource( |
|
|
|
|
// 地址,包括 http/https |
|
|
|
|
@PrimaryKey |
|
|
|
|
var bookSourceUrl: String = "", // 地址,包括 http/https |
|
|
|
|
var bookSourceName: String = "", // 名称 |
|
|
|
|
var bookSourceGroup: String? = null, // 分组 |
|
|
|
|
var bookSourceType: Int = BookType.default, // 类型,0 文本,1 音频, 3 图片 |
|
|
|
|
var bookUrlPattern: String? = null, // 详情页url正则 |
|
|
|
|
var customOrder: Int = 0, // 手动排序编号 |
|
|
|
|
var enabled: Boolean = true, // 是否启用 |
|
|
|
|
var enabledExplore: Boolean = true, // 启用发现 |
|
|
|
|
override var concurrentRate: String? = null, // 并发率 |
|
|
|
|
override var header: String? = null, // 请求头 |
|
|
|
|
override var loginUrl: String? = null, // 登录地址 |
|
|
|
|
override var loginUi: String? = null, // 登录UI |
|
|
|
|
var loginCheckJs: String? = null, // 登录检测js |
|
|
|
|
var bookSourceComment: String? = null, // 注释 |
|
|
|
|
var lastUpdateTime: Long = 0, // 最后更新时间,用于排序 |
|
|
|
|
var respondTime: Long = 180000L, // 响应时间,用于排序 |
|
|
|
|
var weight: Int = 0, // 智能排序的权重 |
|
|
|
|
var exploreUrl: String? = null, // 发现url |
|
|
|
|
var ruleExplore: ExploreRule? = null, // 发现规则 |
|
|
|
|
var searchUrl: String? = null, // 搜索url |
|
|
|
|
var ruleSearch: SearchRule? = null, // 搜索规则 |
|
|
|
|
var ruleBookInfo: BookInfoRule? = null, // 书籍信息页规则 |
|
|
|
|
var ruleToc: TocRule? = null, // 目录页规则 |
|
|
|
|
var ruleContent: ContentRule? = null // 正文页规则 |
|
|
|
|
var bookSourceUrl: String = "", |
|
|
|
|
// 名称 |
|
|
|
|
var bookSourceName: String = "", |
|
|
|
|
// 分组 |
|
|
|
|
var bookSourceGroup: String? = null, |
|
|
|
|
// 类型,0 文本,1 音频, 3 图片 |
|
|
|
|
@BookType.Type |
|
|
|
|
var bookSourceType: Int = 0, |
|
|
|
|
// 详情页url正则 |
|
|
|
|
var bookUrlPattern: String? = null, |
|
|
|
|
// 手动排序编号 |
|
|
|
|
var customOrder: Int = 0, |
|
|
|
|
// 是否启用 |
|
|
|
|
var enabled: Boolean = true, |
|
|
|
|
// 启用发现 |
|
|
|
|
var enabledExplore: Boolean = true, |
|
|
|
|
// 并发率 |
|
|
|
|
override var concurrentRate: String? = null, |
|
|
|
|
// 请求头 |
|
|
|
|
override var header: String? = null, |
|
|
|
|
// 登录地址 |
|
|
|
|
override var loginUrl: String? = null, |
|
|
|
|
// 登录UI |
|
|
|
|
override var loginUi: String? = null, |
|
|
|
|
// 登录检测js |
|
|
|
|
var loginCheckJs: String? = null, |
|
|
|
|
// 注释 |
|
|
|
|
var bookSourceComment: String? = null, |
|
|
|
|
// 最后更新时间,用于排序 |
|
|
|
|
var lastUpdateTime: Long = 0, |
|
|
|
|
// 响应时间,用于排序 |
|
|
|
|
var respondTime: Long = 180000L, |
|
|
|
|
// 智能排序的权重 |
|
|
|
|
var weight: Int = 0, |
|
|
|
|
// 发现url |
|
|
|
|
var exploreUrl: String? = null, |
|
|
|
|
// 发现规则 |
|
|
|
|
var ruleExplore: ExploreRule? = null, |
|
|
|
|
// 搜索url |
|
|
|
|
var searchUrl: String? = null, |
|
|
|
|
// 搜索规则 |
|
|
|
|
var ruleSearch: SearchRule? = null, |
|
|
|
|
// 书籍信息页规则 |
|
|
|
|
var ruleBookInfo: BookInfoRule? = null, |
|
|
|
|
// 目录页规则 |
|
|
|
|
var ruleToc: TocRule? = null, |
|
|
|
|
// 正文页规则 |
|
|
|
|
var ruleContent: ContentRule? = null |
|
|
|
|
) : Parcelable, BaseSource { |
|
|
|
|
|
|
|
|
|
override fun getTag(): String { |
|
|
|
|