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 support for yt-dlp in Flatpak environment on Linux

Tonhob62456d1058b
diff --git a/src-tauri/src/core/ytdlp.rs b/src-tauri/src/core/ytdlp.rs
index 52a8dcb5..0344d647 100644
--- a/src-tauri/src/core/ytdlp.rs
+++ b/src-tauri/src/core/ytdlp.rs
@@ -20,6 +20,14 @@ pub async fn find_ytdlp() -> Option<PathBuf> {
"yt-dlp"
};
+ #[cfg(target_os = "linux")]
+ {
+ let flatpak_path = PathBuf::from("/app/bin").join(bin_name);
+ if flatpak_path.exists() {
+ return Some(flatpak_path);
+ }
+ }
+
if let Ok(output) = crate::core::process::command(bin_name)
.arg("--version")
.stdout(Stdio::null())
@@ -56,6 +64,10 @@ pub async fn ensure_ytdlp() -> anyhow::Result<PathBuf> {
return Ok(path);
}
+ if crate::core::dependencies::is_flatpak() {
+ return Err(anyhow!("yt-dlp not found in Flatpak sandbox"));
+ }
+
download_ytdlp_binary().await
}