pull/48/head
kunfei 5 years ago
parent fb350d8ce1
commit 705004d878
  1. 30
      app/src/main/java/io/legado/app/model/webbook/SourceDebug.kt

@ -61,19 +61,23 @@ class SourceDebug(private val webBook: WebBook, callback: Callback) {
fun startDebug(key: String) { fun startDebug(key: String) {
cancelDebug() cancelDebug()
startTime = System.currentTimeMillis() startTime = System.currentTimeMillis()
if (key.isAbsUrl()) { when {
val book = Book() key.isAbsUrl() -> {
book.origin = webBook.sourceUrl val book = Book()
book.bookUrl = key book.origin = webBook.sourceUrl
printLog(webBook.sourceUrl, "⇒开始访问详情页:$key") book.bookUrl = key
infoDebug(book) printLog(webBook.sourceUrl, "⇒开始访问详情页:$key")
} else if (key.contains("::")) { infoDebug(book)
val url = key.substring(key.indexOf("::") + 2) }
printLog(webBook.sourceUrl, "⇒开始访问发现页:$url") key.contains("::") -> {
exploreDebug(url) val url = key.substring(key.indexOf("::") + 2)
} else { printLog(webBook.sourceUrl, "⇒开始访问发现页:$url")
printLog(webBook.sourceUrl, "⇒开始搜索关键字:$key") exploreDebug(url)
searchDebug(key) }
else -> {
printLog(webBook.sourceUrl, "⇒开始搜索关键字:$key")
searchDebug(key)
}
} }
} }

Loading…
Cancel
Save