From 376f235f65e28f5ec5bb696903c5705b090f03a0 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 22 Oct 2019 09:01:15 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/model/WebBook.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 7dc90b751..e290e555c 100644 --- a/app/src/main/java/io/legado/app/model/WebBook.kt +++ b/app/src/main/java/io/legado/app/model/WebBook.kt @@ -98,7 +98,9 @@ class WebBook(val bookSource: BookSource) { context: CoroutineContext = Dispatchers.IO ): Coroutine> { return Coroutine.async(scope, context) { - val body = if (book.bookUrl == book.tocUrl && book.tocHtml.isNullOrEmpty()) { + val body = if (book.bookUrl == book.tocUrl && !book.tocHtml.isNullOrEmpty()) { + book.tocHtml + } else { val analyzeUrl = AnalyzeUrl( book = book, ruleUrl = book.tocUrl, @@ -106,8 +108,6 @@ class WebBook(val bookSource: BookSource) { headerMapF = bookSource.getHeaderMap() ) analyzeUrl.getResponseAsync().await().body() - } else { - book.tocHtml } BookChapterList.analyzeChapterList(this, book, body, bookSource, book.tocUrl) }