mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-27 19:47:51 +02:00
Fix update worker crashing application
This commit is contained in:
@ -225,7 +225,8 @@ class EHentaiUpdateWorker: JobService(), CoroutineScope {
|
||||
}
|
||||
|
||||
suspend fun updateEntryAndGetChapters(manga: Manga): List<Chapter> {
|
||||
val source = sourceManager.get(manga.source) as EHentai
|
||||
val source = sourceManager.get(manga.source) as? EHentai
|
||||
?: throw GalleryNotUpdatedException(false, IllegalStateException("Missing EH-based source (${manga.source})!"))
|
||||
|
||||
try {
|
||||
val updatedManga = source.fetchMangaDetails(manga).toSingle().await(Schedulers.io())
|
||||
|
Reference in New Issue
Block a user