From 6713a7ae3cd37855c011d980e3534865a115d6a6 Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 16 Jul 2020 22:36:01 -0400 Subject: [PATCH] Include source ID if name not found in restore error log (closes #3018) --- .../kanade/tachiyomi/data/backup/BackupRestoreService.kt | 9 ++------- app/src/main/res/values/strings.xml | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt index c57ff2051..bf832a8fc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt @@ -271,13 +271,8 @@ class BackupRestoreService : Service() { if (source != null) { restoreMangaData(manga, source, chapters, categories, history, tracks) } else { - val message = if (manga.source in sourceMapping) { - getString(R.string.source_not_found_name, sourceMapping[manga.source]) - } else { - getString(R.string.source_not_found) - } - - errors.add(Date() to "${manga.title} - $message") + val sourceName = sourceMapping[manga.source] ?: manga.source.toString() + errors.add(Date() to "${manga.title} - ${getString(R.string.source_not_found_name, sourceName)}") } } catch (e: Exception) { errors.add(Date() to "${manga.title} - ${e.message}") diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cb8bd55cc..5704b2d3a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -342,7 +342,6 @@ Automatic backups Backup frequency Maximum backups - Source not found Source not found: %1$s Not logged in: %1$s Backup created