|
|
@ -15,22 +15,35 @@ import splitties.init.appCtx |
|
|
|
data class RssSource( |
|
|
|
data class RssSource( |
|
|
|
@PrimaryKey |
|
|
|
@PrimaryKey |
|
|
|
var sourceUrl: String = "", |
|
|
|
var sourceUrl: String = "", |
|
|
|
|
|
|
|
// 名称 |
|
|
|
var sourceName: String = "", |
|
|
|
var sourceName: String = "", |
|
|
|
|
|
|
|
// 图标 |
|
|
|
var sourceIcon: String = "", |
|
|
|
var sourceIcon: String = "", |
|
|
|
|
|
|
|
// 分组 |
|
|
|
var sourceGroup: String? = null, |
|
|
|
var sourceGroup: String? = null, |
|
|
|
|
|
|
|
// 注释 |
|
|
|
var sourceComment: String? = null, |
|
|
|
var sourceComment: String? = null, |
|
|
|
|
|
|
|
// 是否启用 |
|
|
|
var enabled: Boolean = true, |
|
|
|
var enabled: Boolean = true, |
|
|
|
|
|
|
|
// 自定义变量说明 |
|
|
|
|
|
|
|
var variableComment: String? = null, |
|
|
|
@ColumnInfo(defaultValue = "0") |
|
|
|
@ColumnInfo(defaultValue = "0") |
|
|
|
override var enabledCookieJar: Boolean? = false, |
|
|
|
override var enabledCookieJar: Boolean? = false, |
|
|
|
override var concurrentRate: String? = null, //并发率 |
|
|
|
//并发率 |
|
|
|
override var header: String? = null, // 请求头 |
|
|
|
override var concurrentRate: String? = null, |
|
|
|
override var loginUrl: String? = null, // 登录地址 |
|
|
|
// 请求头 |
|
|
|
override var loginUi: String? = null, //登录UI |
|
|
|
override var header: String? = null, |
|
|
|
var loginCheckJs: String? = null, //登录检测js |
|
|
|
// 登录地址 |
|
|
|
|
|
|
|
override var loginUrl: String? = null, |
|
|
|
|
|
|
|
//登录UI |
|
|
|
|
|
|
|
override var loginUi: String? = null, |
|
|
|
|
|
|
|
//登录检测js |
|
|
|
|
|
|
|
var loginCheckJs: String? = null, |
|
|
|
var sortUrl: String? = null, |
|
|
|
var sortUrl: String? = null, |
|
|
|
var singleUrl: Boolean = false, |
|
|
|
var singleUrl: Boolean = false, |
|
|
|
/*列表规则*/ |
|
|
|
/*列表规则*/ |
|
|
|
var articleStyle: Int = 0, //列表样式,0,1,2 |
|
|
|
//列表样式,0,1,2 |
|
|
|
|
|
|
|
var articleStyle: Int = 0, |
|
|
|
var ruleArticles: String? = null, |
|
|
|
var ruleArticles: String? = null, |
|
|
|
var ruleNextPage: String? = null, |
|
|
|
var ruleNextPage: String? = null, |
|
|
|
var ruleTitle: String? = null, |
|
|
|
var ruleTitle: String? = null, |
|
|
@ -131,6 +144,14 @@ data class RssSource( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun getDisplayVariableComment(otherComment: String): String { |
|
|
|
|
|
|
|
return if (variableComment.isNullOrBlank()) { |
|
|
|
|
|
|
|
otherComment |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
"${variableComment}\n$otherComment" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Suppress("MemberVisibilityCanBePrivate") |
|
|
|
@Suppress("MemberVisibilityCanBePrivate") |
|
|
|
companion object { |
|
|
|
companion object { |
|
|
|
|
|
|
|
|
|
|
|