Fix restore crashing (#90)

This commit is contained in:
Syer10
2021-05-18 20:59:44 -04:00
committed by GitHub
parent 8ebd7869a5
commit 81e123388e

View File

@@ -64,11 +64,7 @@ object LegacyBackupImport : LegacyBackupBase() {
logger.info { logger.info {
""" """
Restore Errors: Restore Errors:
${ ${ errors.joinToString("\n") { "${it.first} - ${it.second}" } }
errors.map {
"${it.first} - ${it.second}"
}.joinToString("\n")
}
Restore Summary: Restore Summary:
- Missing Sources: - Missing Sources:
${validationResult.missingSources.joinToString("\n")} ${validationResult.missingSources.joinToString("\n")}
@@ -119,6 +115,8 @@ object LegacyBackupImport : LegacyBackupBase() {
getHttpSource(manga.source) getHttpSource(manga.source)
} catch (e: NullPointerException) { } catch (e: NullPointerException) {
null null
} catch (e: NoSuchElementException) {
null
} }
val sourceName = sourceMapping[manga.source] ?: manga.source.toString() val sourceName = sourceMapping[manga.source] ?: manga.source.toString()