Handle individual errors in metadata update

This commit is contained in:
len 2016-10-09 12:22:21 +02:00
parent 3b6c37a30b
commit 909917e133

View File

@ -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 ->
source.fetchMangaDetails(manga)
.doOnNext { networkManga ->
manga.copyFrom(networkManga)
db.insertManga(manga).executeAsBlocking()
}
.onErrorReturn { manga }
}
.doOnCompleted {
cancelNotification()