Include source ID if name not found in restore error log (closes #3018)

(cherry picked from commit 6713a7ae3c)
This commit is contained in:
arkon
2020-07-16 22:36:01 -04:00
committed by Jobobby04
parent 7530a7bd4e
commit 8de67c49bc
2 changed files with 2 additions and 8 deletions
@@ -318,13 +318,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}")