Handle failures when updating metadata in library updater

(cherry picked from commit 17109ab7606724dee83981b7b8605fc2d22ef57c)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt
This commit is contained in:
arkon 2021-01-29 22:14:17 -05:00 committed by Jobobby04
parent 675d6e95d3
commit 925ecb282c

View File

@ -407,10 +407,6 @@ class LibraryUpdateService(
downloadManager.downloadChapters(manga, /* SY --> */ chapters.filter { it.manga_id !in chapterFilter } /* SY <-- */, false)
}
val handler = CoroutineExceptionHandler { _, throwable ->
XLog.e(throwable)
}
/**
* Updates the chapters for the given manga and adds them to the database.
*
@ -422,6 +418,9 @@ class LibraryUpdateService(
// Update manga details metadata in the background
if (preferences.autoUpdateMetadata()) {
val handler = CoroutineExceptionHandler { _, exception ->
Timber.e(exception)
}
ioScope.launch(handler) {
val updatedManga = source.getMangaDetails(manga.toMangaInfo())
val sManga = updatedManga.toSManga()