From 0e87dc995aa56bdf2c7465e0c746cb6de32999ab Mon Sep 17 00:00:00 2001 From: inorichi Date: Sun, 24 Jan 2016 13:23:29 +0100 Subject: [PATCH] Add backpressure buffer for downloads --- .../java/eu/kanade/tachiyomi/data/download/DownloadManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java index 9f2c58ee7..da828f33e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java @@ -78,6 +78,7 @@ public class DownloadManager { downloadsSubscription = downloadsQueueSubject .flatMap(Observable::from) .lift(new DynamicConcurrentMergeOperator<>(this::downloadChapter, threadsSubject)) + .onBackpressureBuffer() .observeOn(AndroidSchedulers.mainThread()) .map(download -> areAllDownloadsFinished()) .subscribe(finished -> {