mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 13:51:48 +01:00
Fix restore adding unknown status to items
This commit is contained in:
parent
05558f5733
commit
2c143155d6
@ -66,7 +66,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
|
|||||||
val categories = backupManga.categories
|
val categories = backupManga.categories
|
||||||
val history = backupManga.history
|
val history = backupManga.history
|
||||||
val tracks = backupManga.getTrackingImpl()
|
val tracks = backupManga.getTrackingImpl()
|
||||||
val customManga = backupManga.getCustomMangaInfo(manga)
|
val customManga = backupManga.getCustomMangaInfo()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
restoreMangaData(manga, chapters, categories, history, tracks, backupCategories, customManga)
|
restoreMangaData(manga, chapters, categories, history, tracks, backupCategories, customManga)
|
||||||
|
@ -70,13 +70,13 @@ data class BackupManga(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCustomMangaInfo(manga: Manga): CustomMangaManager.MangaJson? {
|
fun getCustomMangaInfo(): CustomMangaManager.MangaJson? {
|
||||||
if (customTitle != null ||
|
if (customTitle != null ||
|
||||||
customArtist != null ||
|
customArtist != null ||
|
||||||
customAuthor != null ||
|
customAuthor != null ||
|
||||||
customDescription != null ||
|
customDescription != null ||
|
||||||
customGenre != null ||
|
customGenre != null ||
|
||||||
manga.status != customStatus
|
customStatus != 0
|
||||||
) {
|
) {
|
||||||
return CustomMangaManager.MangaJson(
|
return CustomMangaManager.MangaJson(
|
||||||
id = 0L,
|
id = 0L,
|
||||||
@ -85,7 +85,7 @@ data class BackupManga(
|
|||||||
artist = customArtist,
|
artist = customArtist,
|
||||||
description = customDescription,
|
description = customDescription,
|
||||||
genre = customGenre?.toTypedArray(),
|
genre = customGenre?.toTypedArray(),
|
||||||
status = if (manga.status != customStatus) customStatus else null
|
status = customStatus.takeUnless { it == 0 }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
Loading…
Reference in New Issue
Block a user