Use SQLDelight in Backup/Restore (#7295)
* Use SQLDelight in Backup/Restore * Use CoroutineWorker
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package eu.kanade.tachiyomi.source.model
|
||||
|
||||
import data.Chapters
|
||||
import tachiyomi.source.model.ChapterInfo
|
||||
import java.io.Serializable
|
||||
|
||||
@@ -23,6 +24,14 @@ interface SChapter : Serializable {
|
||||
scanlator = other.scanlator
|
||||
}
|
||||
|
||||
fun copyFrom(other: Chapters) {
|
||||
name = other.name
|
||||
url = other.url
|
||||
date_upload = other.date_upload
|
||||
chapter_number = other.chapter_number
|
||||
scanlator = other.scanlator
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun create(): SChapter {
|
||||
return SChapterImpl()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package eu.kanade.tachiyomi.source.model
|
||||
|
||||
import data.Mangas
|
||||
import tachiyomi.source.model.MangaInfo
|
||||
import java.io.Serializable
|
||||
|
||||
@@ -51,6 +52,34 @@ interface SManga : Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
fun copyFrom(other: Mangas) {
|
||||
if (other.author != null) {
|
||||
author = other.author
|
||||
}
|
||||
|
||||
if (other.artist != null) {
|
||||
artist = other.artist
|
||||
}
|
||||
|
||||
if (other.description != null) {
|
||||
description = other.description
|
||||
}
|
||||
|
||||
if (other.genre != null) {
|
||||
genre = other.genre.joinToString(separator = ", ")
|
||||
}
|
||||
|
||||
if (other.thumbnail_url != null) {
|
||||
thumbnail_url = other.thumbnail_url
|
||||
}
|
||||
|
||||
status = other.status.toInt()
|
||||
|
||||
if (!initialized) {
|
||||
initialized = other.initialized
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val UNKNOWN = 0
|
||||
const val ONGOING = 1
|
||||
|
||||
Reference in New Issue
Block a user