Browse Source

Add backpressure buffer for downloads

inorichi 9 years ago
parent
commit
0e87dc995a

+ 1 - 0
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 -> {