pull/32/head
kunfei 5 years ago
parent 6ec36d848a
commit bd09590d36
  1. 8
      app/src/main/java/io/legado/app/model/webbook/SourceDebug.kt

@ -60,19 +60,17 @@ class SourceDebug(private val webBook: WebBook, callback: Callback) {
fun startDebug(key: String) { fun startDebug(key: String) {
cancelDebug() cancelDebug()
startTime = System.currentTimeMillis() startTime = System.currentTimeMillis()
with(webBook) {
if (key.isAbsUrl()) { if (key.isAbsUrl()) {
val book = Book() val book = Book()
book.origin = sourceUrl book.origin = webBook.sourceUrl
book.bookUrl = key book.bookUrl = key
printLog(sourceUrl, 1, "开始访问$key") printLog(webBook.sourceUrl, 1, "开始访问$key")
infoDebug(book) infoDebug(book)
} else { } else {
printLog(sourceUrl, 1, "开始搜索关键字$key") printLog(webBook.sourceUrl, 1, "开始搜索关键字$key")
searchDebug(key) searchDebug(key)
} }
} }
}
private fun searchDebug(key: String) { private fun searchDebug(key: String) {
val search = webBook.searchBook(key, 1) val search = webBook.searchBook(key, 1)

Loading…
Cancel
Save