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.

refactor: update ffmpeg availability check to use location instead of boolean flag

Tonho49ddd86f68f7
diff --git a/src-tauri/src/core/ytdlp.rs b/src-tauri/src/core/ytdlp.rs
index 4ae58007..0ec43809 100644
--- a/src-tauri/src/core/ytdlp.rs
+++ b/src-tauri/src/core/ytdlp.rs
@@ -837,7 +837,7 @@ pub async fn download_video(
_ => "bv*/b".to_string(),
},
_ => {
- if ffmpeg_available {
+ if ffmpeg_location.is_some() {
match quality_height {
Some(h) if h > 0 => format!(
"bv*[height<={}]+ba[ext=m4a]/bv*[height<={}]+ba/b[height<={}]/b",
@@ -876,7 +876,7 @@ pub async fn download_video(
};
let mut base_args = vec!["-f".to_string(), format_selector];
- if format_id.is_none() && mode != "audio" && ffmpeg_available {
+ if format_id.is_none() && mode != "audio" && ffmpeg_location.is_some() {
base_args.push("--merge-output-format".to_string());
base_args.push("mp4".to_string());
}