pull/32/head
kunfei 5 years ago
parent 849febd2ae
commit 3a9478db8d
  1. 13
      app/src/main/java/io/legado/app/model/webbook/BookList.kt

@ -44,10 +44,17 @@ class BookList {
private fun getItem(analyzeRule: AnalyzeRule, bookSource: BookSource): SearchBook? { private fun getItem(analyzeRule: AnalyzeRule, bookSource: BookSource): SearchBook? {
val searchBook = SearchBook() val searchBook = SearchBook()
analyzeRule.setBook(searchBook) analyzeRule.setBook(searchBook)
bookSource.getBookInfoRule().init?.let { with(bookSource.getBookInfoRule()) {
analyzeRule.setContent(analyzeRule.getElement(it)) init?.let {
analyzeRule.setContent(analyzeRule.getElement(it))
}
searchBook.name = analyzeRule.getString(name ?: "")
if (!searchBook.name.isNullOrEmpty()) {
searchBook.author = analyzeRule.getString(author ?: "")
searchBook.coverUrl = analyzeRule.getString(coverUrl ?: "")
return searchBook
}
} }
return null return null
} }
} }
Loading…
Cancel
Save