Fix migration crash because fetch chapter list through a exception

This commit is contained in:
Jobobby04 2020-08-03 19:44:02 -04:00
parent 025d794962
commit 29e1697d2e

View File

@ -373,10 +373,10 @@ class MigrationListController(bundle: Bundle? = null) :
launchUI {
val result = CoroutineScope(migratingManga.manga.migrationJob).async {
val localManga = smartSearchEngine.networkToLocalManga(manga, source.id)
val chapters = source.fetchChapterList(localManga).toSingle().await(
Schedulers.io()
)
try {
val chapters = source.fetchChapterList(localManga).toSingle().await(
Schedulers.io()
)
syncChaptersWithSource(db, chapters, localManga, source)
} catch (e: Exception) {
return@async null