Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat: refine download_video function by removing unnecessary arguments and adjusting connection limits

Tonho34cced8af7d7
diff --git a/src-tauri/src/core/ytdlp.rs b/src-tauri/src/core/ytdlp.rs
index 82d12773..484a937e 100644
--- a/src-tauri/src/core/ytdlp.rs
+++ b/src-tauri/src/core/ytdlp.rs
@@ -647,8 +647,6 @@ pub async fn download_video(
"--no-check-certificate".to_string(),
"--no-warnings".to_string(),
"--no-mtime".to_string(),
- "--no-part".to_string(),
- "--no-cache-dir".to_string(),
"--user-agent".to_string(),
CHROME_UA.to_string(),
"--socket-timeout".to_string(),
@@ -713,7 +711,7 @@ pub async fn download_video(
if use_aria2c && !use_browser_cookies {
if let Some(ref a2_path) = aria2c_path {
- let conns = if is_youtube_url(url) { effective_fragments.max(1) as usize } else { 32.min(effective_fragments as usize * 4) };
+ let conns = if is_youtube_url(url) { effective_fragments.max(1) } else { effective_fragments.max(8).min(16) };
args.push("--downloader".to_string());
args.push(a2_path.to_string_lossy().to_string());
args.push("--downloader-args".to_string());