From 22f7dad49aa2a18ddc7c80c37efd1c27425e4536 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 12 Nov 2019 15:17:44 +0800 Subject: [PATCH] up --- .../io/legado/app/model/webbook/BookChapterList.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt b/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt index 52cfc7863..c2286d1ab 100644 --- a/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt +++ b/app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt @@ -158,12 +158,11 @@ object BookChapterList { val urlRule = analyzeRule.splitSourceRule(tocRule.chapterUrl ?: "") for (item in elements) { analyzeRule.setContent(item) - val title = analyzeRule.getString(nameRule) - if (title.isNotEmpty()) { - val bookChapter = BookChapter(bookUrl = book.bookUrl) - bookChapter.title = title - bookChapter.url = analyzeRule.getString(urlRule, true) - if (bookChapter.url.isEmpty()) bookChapter.url = baseUrl + val bookChapter = BookChapter(bookUrl = book.bookUrl) + bookChapter.title = analyzeRule.getString(nameRule) + bookChapter.url = analyzeRule.getString(urlRule, true) + if (bookChapter.url.isEmpty()) bookChapter.url = baseUrl + if (bookChapter.title.isNotEmpty()) { chapterList.add(bookChapter) } }