pull/48/head
kunfei 5 years ago
parent a96303e53f
commit 22f7dad49a
  1. 11
      app/src/main/java/io/legado/app/model/webbook/BookChapterList.kt

@ -158,12 +158,11 @@ object BookChapterList {
val urlRule = analyzeRule.splitSourceRule(tocRule.chapterUrl ?: "") val urlRule = analyzeRule.splitSourceRule(tocRule.chapterUrl ?: "")
for (item in elements) { for (item in elements) {
analyzeRule.setContent(item) analyzeRule.setContent(item)
val title = analyzeRule.getString(nameRule) val bookChapter = BookChapter(bookUrl = book.bookUrl)
if (title.isNotEmpty()) { bookChapter.title = analyzeRule.getString(nameRule)
val bookChapter = BookChapter(bookUrl = book.bookUrl) bookChapter.url = analyzeRule.getString(urlRule, true)
bookChapter.title = title if (bookChapter.url.isEmpty()) bookChapter.url = baseUrl
bookChapter.url = analyzeRule.getString(urlRule, true) if (bookChapter.title.isNotEmpty()) {
if (bookChapter.url.isEmpty()) bookChapter.url = baseUrl
chapterList.add(bookChapter) chapterList.add(bookChapter)
} }
} }

Loading…
Cancel
Save