pull/49/head
kunfei 5 years ago
parent 2155812caf
commit cb60f3fc26
  1. 6
      app/src/main/java/io/legado/app/data/entities/BookChapter.kt
  2. 3
      app/src/main/java/io/legado/app/data/entities/SearchBook.kt
  3. 2
      app/src/main/java/io/legado/app/model/Debug.kt

@ -15,10 +15,8 @@ import kotlinx.android.parcel.Parcelize
@Entity( @Entity(
tableName = "chapters", tableName = "chapters",
primaryKeys = ["url", "bookUrl"], primaryKeys = ["url", "bookUrl"],
indices = [(Index(value = ["bookUrl"], unique = false)), (Index( indices = [(Index(value = ["bookUrl"], unique = false)),
value = ["bookUrl", "index"], (Index(value = ["bookUrl", "index"], unique = true))],
unique = true
))],
foreignKeys = [(ForeignKey( foreignKeys = [(ForeignKey(
entity = Book::class, entity = Book::class,
parentColumns = ["bookUrl"], parentColumns = ["bookUrl"],

@ -10,7 +10,8 @@ import kotlinx.android.parcel.Parcelize
@Parcelize @Parcelize
@Entity( @Entity(
tableName = "searchBooks", tableName = "searchBooks",
indices = [(Index(value = ["bookUrl"], unique = true))], indices = [(Index(value = ["bookUrl"], unique = true)),
(Index(value = ["bookSourceUrl"], unique = false))],
foreignKeys = [(ForeignKey( foreignKeys = [(ForeignKey(
entity = BookSource::class, entity = BookSource::class,
parentColumns = ["bookSourceUrl"], parentColumns = ["bookSourceUrl"],

@ -54,7 +54,7 @@ object Debug {
cancelDebug() cancelDebug()
debugSource = rssSource.sourceUrl debugSource = rssSource.sourceUrl
log(debugSource, "︾开始解析RSS") log(debugSource, "︾开始解析RSS")
Rss.getArticles(rssSource) Rss.getArticles(rssSource, 1)
.onSuccess { .onSuccess {
if (it == null) { if (it == null) {
log(debugSource, "︽解析失败", state = -1) log(debugSource, "︽解析失败", state = -1)

Loading…
Cancel
Save