diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt index c6bc9a65a..ae47453eb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt @@ -181,7 +181,16 @@ class Downloader( subscriptions.clear() subscriptions += downloadsRelay.concatMapIterable { it } - .concatMap { downloadChapter(it).subscribeOn(Schedulers.io()) } + // Concurrently download from 5 different sources + .groupBy { it.source } + .flatMap( + { bySource -> + bySource.concatMap { download -> + downloadChapter(download).subscribeOn(Schedulers.io()) + } + }, + 5 + ) .onBackpressureBuffer() .observeOn(AndroidSchedulers.mainThread()) .subscribe(