搜索跳到详情页时写入目录url

pull/873/head
gedoor 4 years ago
parent a7a673faea
commit 54006c3831
  1. 6
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt
  2. 7
      app/src/main/java/io/legado/app/model/webBook/BookList.kt

@ -28,9 +28,9 @@ class AnalyzeRule(val ruleData: RuleDataInterface) : JsExtensions {
var book: BaseBook? = null var book: BaseBook? = null
var chapter: BookChapter? = null var chapter: BookChapter? = null
var nextChapterUrl: String? = null var nextChapterUrl: String? = null
private var content: Any? = null var content: Any? = null
private var baseUrl: String? = null var baseUrl: String? = null
private var redirectUrl: URL? = null var redirectUrl: URL? = null
private var isJSON: Boolean = false private var isJSON: Boolean = false
private var isRegex: Boolean = false private var isRegex: Boolean = false

@ -168,6 +168,13 @@ object BookList {
Debug.log(bookSource.bookSourceUrl, "┌获取封面链接") Debug.log(bookSource.bookSourceUrl, "┌获取封面链接")
searchBook.coverUrl = analyzeRule.getString(coverUrl, true) searchBook.coverUrl = analyzeRule.getString(coverUrl, true)
Debug.log(bookSource.bookSourceUrl, "${searchBook.coverUrl}") Debug.log(bookSource.bookSourceUrl, "${searchBook.coverUrl}")
Debug.log(bookSource.bookSourceUrl, "┌获取目录链接")
searchBook.tocUrl = analyzeRule.getString(tocUrl, true)
if (searchBook.tocUrl.isEmpty()) searchBook.tocUrl = baseUrl
if (searchBook.tocUrl == baseUrl) {
searchBook.tocHtml = analyzeRule.content.toString()
}
Debug.log(bookSource.bookSourceUrl, "${searchBook.tocUrl}")
return searchBook return searchBook
} }
} }

Loading…
Cancel
Save