{"record":{"id":"58538aa6de6583ac","repo":"tonhowtf/omniget","slug":"yt-dlp-not-found-install-it-in-settings","errorCode":null,"errorMessage":"yt-dlp not found — install it in Settings","messagePattern":"yt-dlp not found — install it in Settings","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/platforms/tiktok.rs","lineNumber":320,"sourceCode":"        ];\n        let json = crate::core::ytdlp::get_video_info(&ytdlp_path, url, &extra_flags).await?;\n        let mut info =\n            crate::platforms::generic_ytdlp::GenericYtdlpDownloader::parse_video_info(&json)?;\n        for q in &mut info.available_qualities {\n            q.url = url.to_string();\n            q.format = \"ytdlp\".to_string();\n        }\n        Ok(info)\n    }\n\n    async fn get_media_info_via_ytdlp(\n        &self,\n        url: &str,\n        post_id: &str,\n    ) -> anyhow::Result<MediaInfo> {\n        let ytdlp_path = crate::core::ytdlp::find_ytdlp_cached()\n            .await\n            .ok_or_else(|| anyhow!(\"yt-dlp not found — install it in Settings\"))?;\n\n        let extra_flags = vec![\n            \"--referer\".to_string(),\n            \"https://www.tiktok.com/\".to_string(),\n        ];\n\n        let json = crate::core::ytdlp::get_video_info(&ytdlp_path, url, &extra_flags).await?;\n\n        let title = json\n            .get(\"title\")\n            .and_then(|v| v.as_str())\n            .map(|s| format!(\"tiktok_{}\", sanitize_filename::sanitize(s)))\n            .unwrap_or_else(|| format!(\"tiktok_{}\", post_id));\n\n        let author = json\n            .get(\"uploader\")\n            .or_else(|| json.get(\"creator\"))\n            .and_then(|v| v.as_str())","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/platforms/tiktok.rs#L302-L338","documentation":"get_media_info_via_ytdlp requires the external yt-dlp binary and looks it up via crate::core::ytdlp::find_ytdlp_cached(). When the lookup returns None — yt-dlp is not installed, not on PATH, or not configured in app settings — this error is raised directing the user to install it in Settings.","triggerScenarios":"get_media_info falls back to get_media_info_via_ytdlp (e.g. after the direct scrape failed) and find_ytdlp_cached() resolves to None; also invoked directly when ytdlp_path is not supplied and no cached binary is found.","commonSituations":"Fresh install where yt-dlp was never downloaded; yt-dlp removed from PATH after a system update; bundled binary failed to download in Settings; running in a container/image without yt-dlp; YouTube/TikTok blocking forcing reliance on the fallback.","solutions":["Install yt-dlp from the app's Settings screen (the bundled installer).","Or install yt-dlp system-wide (pip install -U yt-dlp or brew install yt-dlp) so it is on PATH.","Set the explicit ytdlp_path option to a known yt-dlp binary location.","Verify with `yt-dlp --version` that the binary is executable, then retry."],"exampleFix":"// before: hard failure when yt-dlp missing\nlet info = tiktok.get_media_info(url).await?;\n// after: pre-check and guide the user\nif crate::core::ytdlp::find_ytdlp_cached().await.is_none() {\n    eprintln!(\"yt-dlp not found — install it in Settings\");\n    return Err(anyhow!(\"yt-dlp not found — install it in Settings\"));\n}\nlet info = tiktok.get_media_info(url).await?;","handlingStrategy":"validation","validationCode":"// check before invoking any yt-dlp path\nif which(\"yt-dlp\").is_err() {\n    return Err(anyhow!(\"yt-dlp not found — install it in Settings\"));\n}","typeGuard":"fn has_ytdlp() -> bool { std::process::Command::new(\"yt-dlp\").arg(\"--version\").output().map(|o| o.status.success()).unwrap_or(false) }","tryCatchPattern":"match tiktok.get_media_info(url).await {\n    Err(e) if e.to_string().contains(\"yt-dlp not found\") => Err(InstallYtdlpUserAction),\n    other => other,\n}","preventionTips":["Install yt-dlp during app setup, not lazily at first failure.","Pin and ship a known-good yt-dlp binary with the app.","Expose a Settings check that validates yt-dlp presence at startup.","Pass an explicit ytdlp_path instead of relying on PATH lookup."],"tags":["yt-dlp","missing-binary","dependency","configuration"],"backgroundTag":"missing-dependency","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}