mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-27 09:44:55 +03:00
Handle individual errors in metadata update
This commit is contained in:
parent
3b6c37a30b
commit
909917e133
1 changed files with 6 additions and 4 deletions
|
@ -300,10 +300,12 @@ class LibraryUpdateService : Service() {
|
|||
val source = sourceManager.get(manga.source) as? OnlineSource
|
||||
?: return@concatMap Observable.empty<Manga>()
|
||||
|
||||
source.fetchMangaDetails(manga).doOnNext { networkManga ->
|
||||
manga.copyFrom(networkManga)
|
||||
db.insertManga(manga).executeAsBlocking()
|
||||
}
|
||||
source.fetchMangaDetails(manga)
|
||||
.doOnNext { networkManga ->
|
||||
manga.copyFrom(networkManga)
|
||||
db.insertManga(manga).executeAsBlocking()
|
||||
}
|
||||
.onErrorReturn { manga }
|
||||
}
|
||||
.doOnCompleted {
|
||||
cancelNotification()
|
||||
|
|
Loading…
Reference in a new issue