From cb9289dc14f7659c1311f30bf32027c3080a4a2e Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Fri, 21 Jan 2022 12:59:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=90=9C=E7=B4=A2=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E4=B8=BA=E8=AF=A6=E6=83=85=E9=A1=B5=E9=93=BE=E6=8E=A5=20?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E4=B9=A6=E6=BA=90=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/service/CheckSourceService.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/service/CheckSourceService.kt b/app/src/main/java/io/legado/app/service/CheckSourceService.kt index f4f592ed7..ceb4a9993 100644 --- a/app/src/main/java/io/legado/app/service/CheckSourceService.kt +++ b/app/src/main/java/io/legado/app/service/CheckSourceService.kt @@ -133,7 +133,10 @@ class CheckSourceService : BaseService() { } books = WebBook.exploreBookAwait(this, source, url) } - val book = WebBook.getBookInfoAwait(this, source, books.first().toBook()) + var book = books.first().toBook() + if (book.tocUrl.isBlank()) { + book = WebBook.getBookInfoAwait(this, source, book) + } val toc = WebBook.getChapterListAwait(this, source, book) val nextChapterUrl = toc.getOrNull(1)?.url ?: toc.first().url val content = WebBook.getContentAwait(