diff --git a/app/src/main/java/io/legado/app/data/entities/BookSource.kt b/app/src/main/java/io/legado/app/data/entities/BookSource.kt index 20965dbf7..aada00709 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookSource.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookSource.kt @@ -48,23 +48,23 @@ data class BookSource( ) : Parcelable { @Ignore @IgnoredOnParcel - var searchRuleV: SearchRule? = null + private var searchRuleV: SearchRule? = null @Ignore @IgnoredOnParcel - var exploreRuleV: ExploreRule? = null + private var exploreRuleV: ExploreRule? = null @Ignore @IgnoredOnParcel - var bookInfoRuleV: BookInfoRule? = null + private var bookInfoRuleV: BookInfoRule? = null @Ignore @IgnoredOnParcel - var tocRuleV: TocRule? = null + private var tocRuleV: TocRule? = null @Ignore @IgnoredOnParcel - var contentRuleV: ContentRule? = null + private var contentRuleV: ContentRule? = null @Throws(Exception::class) fun getHeaderMap(): Map { diff --git a/app/src/main/java/io/legado/app/model/Rss.kt b/app/src/main/java/io/legado/app/model/Rss.kt index d962696eb..c22ac6c45 100644 --- a/app/src/main/java/io/legado/app/model/Rss.kt +++ b/app/src/main/java/io/legado/app/model/Rss.kt @@ -18,7 +18,7 @@ object Rss { ): Coroutine> { return Coroutine.async(scope, context) { val analyzeUrl = AnalyzeUrl(rssSource.sourceUrl) - val body = if (analyzeUrl.useWebView()) { + val body = if (analyzeUrl.useWebView) { analyzeUrl.getResultByWebView(rssSource.sourceUrl) } else { analyzeUrl.getResponseAwait().body() diff --git a/app/src/main/java/io/legado/app/model/WebBook.kt b/app/src/main/java/io/legado/app/model/WebBook.kt index b24865544..89e4cabcc 100644 --- a/app/src/main/java/io/legado/app/model/WebBook.kt +++ b/app/src/main/java/io/legado/app/model/WebBook.kt @@ -97,6 +97,7 @@ class WebBook(val bookSource: BookSource) { headerMapF = bookSource.getHeaderMap() ) if (analyzeUrl.useWebView) { + bookSource.getContentRule() analyzeUrl.getResultByWebView(bookSource.bookSourceUrl) } else { analyzeUrl.getResponseAwait().body()