Add custom Thumbnail Url. Support backup & restore (#1059)
* Add custom thumbnail url. Support backup & restore - add custom thumbnail url in edit info/custom - include it in backup n restore * increase chop char * edit chop char again to match screenshoot * tweak truncating middle part * apply edited cover to history, updates , others * simplify placeholder logic --------- Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
This commit is contained in:
@@ -33,6 +33,7 @@ interface SManga : Serializable {
|
||||
val originalTitle: String
|
||||
val originalAuthor: String?
|
||||
val originalArtist: String?
|
||||
val originalThumbnailUrl: String?
|
||||
val originalDescription: String?
|
||||
val originalGenre: String?
|
||||
val originalStatus: Int
|
||||
@@ -44,11 +45,11 @@ interface SManga : Serializable {
|
||||
it.title = originalTitle
|
||||
it.artist = originalArtist
|
||||
it.author = originalAuthor
|
||||
it.thumbnail_url = originalThumbnailUrl
|
||||
it.description = originalDescription
|
||||
it.genre = originalGenre
|
||||
it.status = originalStatus
|
||||
// SY <--
|
||||
it.thumbnail_url = thumbnail_url
|
||||
it.update_strategy = update_strategy
|
||||
it.initialized = initialized
|
||||
}
|
||||
@@ -103,7 +104,7 @@ fun SManga.copy(
|
||||
description: String? = this.originalDescription,
|
||||
genre: String? = this.originalGenre,
|
||||
status: Int = this.status,
|
||||
thumbnail_url: String? = this.thumbnail_url,
|
||||
thumbnail_url: String? = this.originalThumbnailUrl,
|
||||
initialized: Boolean = this.initialized,
|
||||
) = SManga.create().also {
|
||||
it.url = url
|
||||
|
||||
@@ -31,6 +31,8 @@ class SMangaImpl : SManga {
|
||||
get() = author
|
||||
override val originalArtist: String?
|
||||
get() = artist
|
||||
override val originalThumbnailUrl: String?
|
||||
get() = thumbnail_url
|
||||
override val originalDescription: String?
|
||||
get() = description
|
||||
override val originalGenre: String?
|
||||
|
||||
Reference in New Issue
Block a user