From bf0a493020aa2e0ffea47e0d10105dd525439f23 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Wed, 14 Jan 2026 14:13:14 +0800 Subject: Update src-tauri/src/core/downloader.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src-tauri/src/core/downloader.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src-tauri/src/core/downloader.rs b/src-tauri/src/core/downloader.rs index d792167..7ff81ad 100644 --- a/src-tauri/src/core/downloader.rs +++ b/src-tauri/src/core/downloader.rs @@ -134,6 +134,13 @@ pub async fn download_files(window: Window, tasks: Vec, max_concur let result = hex::encode(hasher.finalize()); if &result == expected_sha1 { // Already valid, skip download + let skipped_size = tokio::fs::metadata(&task.path) + .await + .map(|m| m.len()) + .unwrap_or(0); + if skipped_size > 0 { + let _ = progress.add_bytes(skipped_size); + } emit_progress(&window, &file_name, "Skipped", 0, 0, &progress.inc_completed()); return Ok(()); } -- cgit v1.2.3-70-g09d2