Inline processDownloadItemParts

This commit is contained in:
Nicholas Wallace
2025-07-12 08:30:16 -07:00
parent e69c065d5b
commit a870adf92e
@@ -84,9 +84,7 @@ class DownloadItemManager(
"checkUpdateDownloadQueue: numPartsToGet=$numPartsToGet, nextDownloadItemParts=${nextDownloadItemParts.size}"
)
if (nextDownloadItemParts.isNotEmpty()) {
processDownloadItemParts(nextDownloadItemParts)
}
nextDownloadItemParts.forEach { startInternalDownload(it) }
if (currentDownloadItemParts.size >= maxSimultaneousDownloads) {
break
@@ -96,11 +94,6 @@ class DownloadItemManager(
if (currentDownloadItemParts.isNotEmpty()) startWatchingDownloads()
}
/** Processes the download item parts. */
private fun processDownloadItemParts(nextDownloadItemParts: List<DownloadItemPart>) {
nextDownloadItemParts.forEach { startInternalDownload(it) }
}
/** Starts an internal download. */
private fun startInternalDownload(downloadItemPart: DownloadItemPart) {
// Create internal download location at temp directory location