Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.
Rust downloadmanagerguihacktoberfesthomebrewlightweightlinuxlinux-distributionlocal-firstmacosmacos-packagemedia-toolboxopen-sourcerustsveltetauritrendingtrending-repositorieswindowswindows-desktopytdlp
fix: update CHUNK_THRESHOLD and adjust chunk count calculation in tests
Tonho59730df53cbf
diff --git a/src-tauri/src/core/direct_downloader.rs b/src-tauri/src/core/direct_downloader.rsindex bdd624b0..362fa4e8 100644--- a/src-tauri/src/core/direct_downloader.rs+++ b/src-tauri/src/core/direct_downloader.rs@@ -14,7 +14,7 @@ use tokio_util::sync::CancellationToken;const CHUNK_TIMEOUT: Duration = Duration::from_secs(45);const MAX_RETRIES: u32 = 3;const CHUNK_SIZE: u64 = 10 * 1024 * 1024;-const CHUNK_THRESHOLD: u64 = 5 * 1024 * 1024;+const CHUNK_THRESHOLD: u64 = 10 * 1024 * 1024;const MAX_PARALLEL: usize = 12;const MAX_PER_HOST: usize = 16;@@ -549,7 +549,7 @@ mod tests {#[test]fn chunk_count_for_12mb() {let total: u64 = 12 * 1024 * 1024;- assert_eq!(total.div_ceil(CHUNK_SIZE), 3);+ assert_eq!(total.div_ceil(CHUNK_SIZE), 2);}#[test]