From 8842b5c115f35436f6515dbed320406c33523e08 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 14 Jul 2019 12:31:07 +0800 Subject: [PATCH] up --- .../io/legado/app/model/webbook/BookList.kt | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/webbook/BookList.kt b/app/src/main/java/io/legado/app/model/webbook/BookList.kt index a7a0e827c..4676828dd 100644 --- a/app/src/main/java/io/legado/app/model/webbook/BookList.kt +++ b/app/src/main/java/io/legado/app/model/webbook/BookList.kt @@ -64,14 +64,20 @@ class BookList { } else { if (allInOne) { for (item in collections) { - getAllInOneItem(analyzer, bookListRule, bookSource)?.let { - + getAllInOneItem(analyzer, bookListRule, bookSource, baseUrl)?.let { searchBook -> + if (baseUrl == searchBook.bookUrl) { + searchBook.bookInfoHtml = body + } + bookList.add(searchBook) } } } else { for (item in collections) { - getSearchItem(analyzer, bookListRule, bookSource)?.let { - + getSearchItem(analyzer, bookListRule, bookSource, baseUrl)?.let { searchBook -> + if (baseUrl == searchBook.bookUrl) { + searchBook.bookInfoHtml = body + } + bookList.add(searchBook) } } } @@ -105,7 +111,8 @@ class BookList { private fun getAllInOneItem( analyzeRule: AnalyzeRule, bookListRule: BookListRule, - bookSource: BookSource + bookSource: BookSource, + baseUrl: String ): SearchBook? { val searchBook = SearchBook() searchBook.origin = bookSource.bookSourceUrl @@ -118,7 +125,8 @@ class BookList { private fun getSearchItem( analyzeRule: AnalyzeRule, bookListRule: BookListRule, - bookSource: BookSource + bookSource: BookSource, + baseUrl: String ): SearchBook? { val searchBook = SearchBook() searchBook.origin = bookSource.bookSourceUrl