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) }