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.

fix: pass cancel token to telegram_download_media for improved cancellation handling

Tonhoa0574e318d95
diff --git a/src-tauri/src/commands/telegram.rs b/src-tauri/src/commands/telegram.rs
index 592a1f7e..bedd59b9 100644
--- a/src-tauri/src/commands/telegram.rs
+++ b/src-tauri/src/commands/telegram.rs
@@ -223,6 +223,7 @@ pub async fn telegram_download_media(
message_id,
&output_path,
tx,
+ &cancel_token,
) => r,
_ = cancel_token.cancelled() => {
Err(anyhow::anyhow!("Download cancelado"))