Fix update worker crashing application
This commit is contained in:
parent
9ff8235de4
commit
39ffd3c3bc
@ -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())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user