From 14b03b97900856e232f2d7576a63f86117c3e722 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Tue, 24 Sep 2024 01:02:14 +0200 Subject: [PATCH] Ensure at least one source is downloading at all times --- .../suwayomi/tachidesk/manga/impl/download/DownloadManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt index 08d8db3b7..77f5eb4a7 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/DownloadManager.kt @@ -204,7 +204,7 @@ object DownloadManager { "Failed: ${downloadQueue.size - availableDownloads.size}" } - if (runningDownloaders.size < serverConfig.maxSourcesInParallel.value) { + if (runningDownloaders.size < serverConfig.maxSourcesInParallel.value.coerceAtLeast(1)) { availableDownloads .asSequence() .map { it.manga.sourceId }