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: add async task to check for yt-dlp updates and ensure JS runtime

Tonho8b0f079f1663
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 3e9b8911..42a1ef90 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -300,6 +300,17 @@ pub fn run() {
mgr.load_all(host);
}
+ tauri::async_runtime::spawn(async {
+ if let Some(ytdlp) = core::ytdlp::find_ytdlp_cached().await {
+ match core::ytdlp::check_ytdlp_update(&ytdlp).await {
+ Ok(true) => tracing::info!("yt-dlp updated successfully"),
+ Ok(false) => tracing::debug!("yt-dlp already up to date"),
+ Err(e) => tracing::warn!("yt-dlp update check failed: {}", e),
+ }
+ }
+ core::dependencies::ensure_js_runtime().await;
+ });
+
if let Some(url) = external_url::find_external_url_arg(std::env::args().skip(1)) {
let app_handle = app.handle().clone();
tauri::async_runtime::spawn(async move {