mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 18:51:51 +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 history = backupManga.history
|
||||
val tracks = backupManga.getTrackingImpl()
|
||||
val customManga = backupManga.getCustomMangaInfo(manga)
|
||||
val customManga = backupManga.getCustomMangaInfo()
|
||||
|
||||
try {
|
||||
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 ||
|
||||
customArtist != null ||
|
||||
customAuthor != null ||
|
||||
customDescription != null ||
|
||||
customGenre != null ||
|
||||
manga.status != customStatus
|
||||
customStatus != 0
|
||||
) {
|
||||
return CustomMangaManager.MangaJson(
|
||||
id = 0L,
|
||||
@ -85,7 +85,7 @@ data class BackupManga(
|
||||
artist = customArtist,
|
||||
description = customDescription,
|
||||
genre = customGenre?.toTypedArray(),
|
||||
status = if (manga.status != customStatus) customStatus else null
|
||||
status = customStatus.takeUnless { it == 0 }
|
||||
)
|
||||
}
|
||||
return null
|
||||
|
Loading…
Reference in New Issue
Block a user