From 6bcb3aed8154085b57e6f130c3976d7bf898796b Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 14 Jul 2019 09:45:24 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/data/entities/SearchBook.kt | 3 ++- app/src/main/java/io/legado/app/model/webbook/BookList.kt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt index e2c64c081..bc08d8219 100644 --- a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt +++ b/app/src/main/java/io/legado/app/data/entities/SearchBook.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, 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 e16ab3a7a..827384c57 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 @@ -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 } }