pull/32/head
kunfei 5 years ago
parent e2b4134c18
commit 6bcb3aed81
  1. 3
      app/src/main/java/io/legado/app/data/entities/SearchBook.kt
  2. 4
      app/src/main/java/io/legado/app/model/webbook/BookList.kt

@ -16,7 +16,8 @@ import kotlinx.android.parcel.Parcelize
data class SearchBook(
@PrimaryKey
var bookUrl: String = "",
var origin: String = "", // 书源规则id(默认-1,表示本地书籍)
var origin: String = "", // 书源规则
var originName: String = "",
var name: String? = null,
var author: String? = null,
var tag: String? = null,

@ -44,6 +44,8 @@ class BookList {
private fun getItem(analyzeRule: AnalyzeRule, bookSource: BookSource, baseUrl: String): SearchBook? {
val searchBook = SearchBook()
searchBook.bookUrl = baseUrl
searchBook.origin = bookSource.bookSourceUrl
searchBook.originName = bookSource.bookSourceName
analyzeRule.setBook(searchBook)
with(bookSource.getBookInfoRule()) {
init?.let {
@ -54,6 +56,8 @@ class BookList {
searchBook.author = analyzeRule.getString(author ?: "")
searchBook.coverUrl = analyzeRule.getString(coverUrl ?: "")
searchBook.intro = analyzeRule.getString(intro ?: "")
searchBook.latestChapterTitle = analyzeRule.getString(lastChapter ?: "")
return searchBook
}
}

Loading…
Cancel
Save