mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-28 03:57:50 +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> {
|
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 {
|
try {
|
||||||
val updatedManga = source.fetchMangaDetails(manga).toSingle().await(Schedulers.io())
|
val updatedManga = source.fetchMangaDetails(manga).toSingle().await(Schedulers.io())
|
||||||
|
Reference in New Issue
Block a user