diff --git a/src-tauri/src/downloader.rs b/src-tauri/src/downloader.rs index 29c92ef..22a27ba 100644 --- a/src-tauri/src/downloader.rs +++ b/src-tauri/src/downloader.rs @@ -177,13 +177,6 @@ pub async fn download_video( break; // EOF } - // Log info - app.emit("download-log", LogEvent { - id: id.clone(), - message: out_line.trim().to_string(), - level: "info".to_string(), - }).ok(); - // Parse progress if let Some(caps) = re.captures(&out_line) { if let Some(pct_match) = caps.get(1) { @@ -196,6 +189,12 @@ pub async fn download_video( }).ok(); } } + } else { // Only emit download-log if it's NOT a progress line + app.emit("download-log", LogEvent { + id: id.clone(), + message: out_line.trim().to_string(), + level: "info".to_string(), + }).ok(); } } res = stderr_reader.read_line(&mut err_line) => {