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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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