Merge pull request #1890 from Xwite/master

fix(SourceAnalyzer): enabledCookieJar option
pull/1894/head^2
kunfei 3 years ago committed by GitHub
commit ad1cbbfce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/src/main/java/io/legado/app/data/entities/RssSource.kt
  2. 2
      app/src/main/java/io/legado/app/help/SourceAnalyzer.kt

@ -153,6 +153,7 @@ data class RssSource(
style = doc.readString("$.style"), style = doc.readString("$.style"),
enableJs = doc.readBool("$.enableJs") ?: true, enableJs = doc.readBool("$.enableJs") ?: true,
loadWithBaseUrl = doc.readBool("$.loadWithBaseUrl") ?: true, loadWithBaseUrl = doc.readBool("$.loadWithBaseUrl") ?: true,
enabledCookieJar = doc.readBool("$.enabledCookieJar") ?: false,
customOrder = doc.readInt("$.customOrder") ?: 0 customOrder = doc.readInt("$.customOrder") ?: 0
) )
} }

@ -150,6 +150,7 @@ object SourceAnalyzer {
source.customOrder = sourceAny.customOrder source.customOrder = sourceAny.customOrder
source.enabled = sourceAny.enabled source.enabled = sourceAny.enabled
source.enabledExplore = sourceAny.enabledExplore source.enabledExplore = sourceAny.enabledExplore
source.enabledCookieJar = sourceAny.enabledCookieJar
source.concurrentRate = sourceAny.concurrentRate source.concurrentRate = sourceAny.concurrentRate
source.header = sourceAny.header source.header = sourceAny.header
source.loginUrl = when (sourceAny.loginUrl) { source.loginUrl = when (sourceAny.loginUrl) {
@ -219,6 +220,7 @@ object SourceAnalyzer {
var customOrder: Int = 0, // 手动排序编号 var customOrder: Int = 0, // 手动排序编号
var enabled: Boolean = true, // 是否启用 var enabled: Boolean = true, // 是否启用
var enabledExplore: Boolean = true, // 启用发现 var enabledExplore: Boolean = true, // 启用发现
var enabledCookieJar: Boolean = false, // 启用CookieJar
var concurrentRate: String? = null, // 并发率 var concurrentRate: String? = null, // 并发率
var header: String? = null, // 请求头 var header: String? = null, // 请求头
var loginUrl: Any? = null, // 登录规则 var loginUrl: Any? = null, // 登录规则

Loading…
Cancel
Save