fix error on download files that does not allow resume and can't be concurrent

This commit is contained in:
AmirHossein Abdolmotallebi 2024-07-15 18:22:36 +03:30
parent 30e86011e9
commit 44d2936767

View File

@ -313,7 +313,7 @@ class DownloadJob(
val inactivePart =
kotlin.runCatching { mutableInactivePartDownloaderList.removeAt(0) }.getOrNull()
if (inactivePart != null) return inactivePart
if (downloadManager.settings.dynamicPartCreationMode) {
if (supportsConcurrent && downloadManager.settings.dynamicPartCreationMode) {
synchronized(partSplitLock) {
val candidates = getPartDownloaderList()
.toList()