diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt index 8528f5f6af..98bf2f6a69 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt @@ -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) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt index 3005868022..0c7ed46256 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt @@ -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