Fix false update notifications for lewd sources

This commit is contained in:
NerdNumber9
2019-08-08 13:49:27 -04:00
parent 5195cb8eda
commit dce08d4922
2 changed files with 14 additions and 4 deletions

View File

@@ -30,8 +30,7 @@ import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.util.*
import exh.EH_SOURCE_ID
import exh.EXH_SOURCE_ID
import exh.LIBRARY_UPDATE_EXCLUDED_SOURCES
import rx.Observable
import rx.Subscription
import rx.schedulers.Schedulers
@@ -288,9 +287,9 @@ class LibraryUpdateService(
.doOnNext { showProgressNotification(it, count.andIncrement, mangaToUpdate.size) }
// Update the chapters of the manga.
.concatMap { manga ->
if(manga.source == EXH_SOURCE_ID || manga.source == EH_SOURCE_ID) {
if(manga.source in LIBRARY_UPDATE_EXCLUDED_SOURCES) {
// Ignore EXH manga, updating chapters for every manga will get you banned
Observable.just(manga)
Observable.empty()
} else {
updateManga(manga)
// If there's any error, return empty update and continue.