pull/32/head
kunfei 5 years ago
parent 5f0f9e2ec7
commit e7a3016439
  1. 3
      app/src/main/java/io/legado/app/data/entities/SearchBook.kt
  2. 16
      app/src/main/java/io/legado/app/model/webbook/BookList.kt

@ -24,7 +24,8 @@ data class SearchBook(
var description: String? = null, var description: String? = null,
var latestChapterTitle: String? = null, var latestChapterTitle: String? = null,
var time: Long = 0L, var time: Long = 0L,
var variable: String? = null var variable: String? = null,
var bookInfoHtml: String? = null
) : Parcelable, BaseBook { ) : Parcelable, BaseBook {
@IgnoredOnParcel @IgnoredOnParcel

@ -29,7 +29,21 @@ class BookList {
) )
val analyzer = AnalyzeRule(null) val analyzer = AnalyzeRule(null)
analyzer.setContent(body, baseUrl) analyzer.setContent(body, baseUrl)
bookSource.bookUrlPattern?.let {
if (baseUrl.matches(it.toRegex())) {
getItem()?.let { searchBook ->
searchBook.bookInfoHtml = body
bookList.add(searchBook)
}
return bookList
}
}
return bookList return bookList
} }
fun getItem(): SearchBook? {
val searchBook = SearchBook()
return null
}
} }
Loading…
Cancel
Save