mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 04:29:19 +01:00
Include source name in backup restore error logs (closes #4230)
This commit is contained in:
parent
b7914909d0
commit
3bb2102eb4
@ -67,16 +67,17 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier, private val
|
|||||||
val history = backupManga.history
|
val history = backupManga.history
|
||||||
val tracks = backupManga.getTrackingImpl()
|
val tracks = backupManga.getTrackingImpl()
|
||||||
|
|
||||||
try {
|
|
||||||
val source = backupManager.sourceManager.get(manga.source)
|
val source = backupManager.sourceManager.get(manga.source)
|
||||||
|
val sourceName = sourceMapping[manga.source] ?: manga.source.toString()
|
||||||
|
|
||||||
|
try {
|
||||||
if (source != null || !online) {
|
if (source != null || !online) {
|
||||||
restoreMangaData(manga, source, chapters, categories, history, tracks, backupCategories, online)
|
restoreMangaData(manga, source, chapters, categories, history, tracks, backupCategories, online)
|
||||||
} else {
|
} else {
|
||||||
val sourceName = sourceMapping[manga.source] ?: manga.source.toString()
|
errors.add(Date() to "${manga.title} [$sourceName]: ${context.getString(R.string.source_not_found_name, sourceName)}")
|
||||||
errors.add(Date() to "${manga.title} - ${context.getString(R.string.source_not_found_name, sourceName)}")
|
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
errors.add(Date() to "${manga.title} - ${e.message}")
|
errors.add(Date() to "${manga.title} [$sourceName]: ${e.message}")
|
||||||
}
|
}
|
||||||
|
|
||||||
restoreProgress += 1
|
restoreProgress += 1
|
||||||
|
@ -86,16 +86,17 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract
|
|||||||
?: JsonArray()
|
?: JsonArray()
|
||||||
)
|
)
|
||||||
|
|
||||||
try {
|
|
||||||
val source = backupManager.sourceManager.get(manga.source)
|
val source = backupManager.sourceManager.get(manga.source)
|
||||||
|
val sourceName = sourceMapping[manga.source] ?: manga.source.toString()
|
||||||
|
|
||||||
|
try {
|
||||||
if (source != null) {
|
if (source != null) {
|
||||||
restoreMangaData(manga, source, chapters, categories, history, tracks)
|
restoreMangaData(manga, source, chapters, categories, history, tracks)
|
||||||
} else {
|
} else {
|
||||||
val sourceName = sourceMapping[manga.source] ?: manga.source.toString()
|
errors.add(Date() to "${manga.title} [$sourceName]: ${context.getString(R.string.source_not_found_name, sourceName)}")
|
||||||
errors.add(Date() to "${manga.title} - ${context.getString(R.string.source_not_found_name, sourceName)}")
|
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
errors.add(Date() to "${manga.title} - ${e.message}")
|
errors.add(Date() to "${manga.title} [$sourceName]: ${e.message}")
|
||||||
}
|
}
|
||||||
|
|
||||||
restoreProgress += 1
|
restoreProgress += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user