pull/1630/head
kunfei 3 years ago
parent c2d1c50dab
commit ae76380e44
  1. 73
      app/src/main/java/io/legado/app/data/entities/BookSource.kt

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

Loading…
Cancel
Save