|
|
@ -64,14 +64,20 @@ class BookList { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (allInOne) { |
|
|
|
if (allInOne) { |
|
|
|
for (item in collections) { |
|
|
|
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 { |
|
|
|
} else { |
|
|
|
for (item in collections) { |
|
|
|
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( |
|
|
|
private fun getAllInOneItem( |
|
|
|
analyzeRule: AnalyzeRule, |
|
|
|
analyzeRule: AnalyzeRule, |
|
|
|
bookListRule: BookListRule, |
|
|
|
bookListRule: BookListRule, |
|
|
|
bookSource: BookSource |
|
|
|
bookSource: BookSource, |
|
|
|
|
|
|
|
baseUrl: String |
|
|
|
): SearchBook? { |
|
|
|
): SearchBook? { |
|
|
|
val searchBook = SearchBook() |
|
|
|
val searchBook = SearchBook() |
|
|
|
searchBook.origin = bookSource.bookSourceUrl |
|
|
|
searchBook.origin = bookSource.bookSourceUrl |
|
|
@ -118,7 +125,8 @@ class BookList { |
|
|
|
private fun getSearchItem( |
|
|
|
private fun getSearchItem( |
|
|
|
analyzeRule: AnalyzeRule, |
|
|
|
analyzeRule: AnalyzeRule, |
|
|
|
bookListRule: BookListRule, |
|
|
|
bookListRule: BookListRule, |
|
|
|
bookSource: BookSource |
|
|
|
bookSource: BookSource, |
|
|
|
|
|
|
|
baseUrl: String |
|
|
|
): SearchBook? { |
|
|
|
): SearchBook? { |
|
|
|
val searchBook = SearchBook() |
|
|
|
val searchBook = SearchBook() |
|
|
|
searchBook.origin = bookSource.bookSourceUrl |
|
|
|
searchBook.origin = bookSource.bookSourceUrl |
|
|
|