{"record":{"id":"4693f8b82f32c47b","repo":"tonhowtf/omniget","slug":"yt-dlp-not-found-install-it-in-settings-mod","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/src/platforms/tiktok/mod.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/src/platforms/tiktok/mod.rs#L302-L338","documentation":"get_media_info_via_ytdlp delegates fetching to an external yt-dlp binary located via find_ytdlp_cached(). When no yt-dlp executable can be found on disk or in PATH, this error is thrown, telling the user to install it through the app's Settings screen.","triggerScenarios":"Calling get_media_info which falls back to get_media_info_via_ytdlp when the native scraper fails, while opts/settings have no configured yt-dlp path and find_ytdlp_cached() finds no installed binary.","commonSituations":"Fresh install without yt-dlp; yt-dlp removed from PATH; corrupted download of the bundled binary; native TikTok scraper failed (blocked) so the fallback runs.","solutions":["Install yt-dlp from the app's Settings screen.","Install yt-dlp manually (pip install yt-dlp or download the binary) and ensure it is on PATH.","Point the app's ytdlp_path setting to an explicit yt-dlp executable location.","Restart the app to refresh the cached lookup if yt-dlp was just installed."],"exampleFix":"// before\nlet ytdlp_path = crate::core::ytdlp::find_ytdlp_cached()\n    .await\n    .ok_or_else(|| anyhow!(\"yt-dlp not found — install it in Settings\"))?;\n// after\nlet ytdlp_path = opts.ytdlp_path.clone()\n    .or_else(crate::core::ytdlp::find_ytdlp_cached().await)\n    .ok_or_else(|| anyhow!(\"yt-dlp not found — install it in Settings or set a custom path\"))?;","handlingStrategy":"validation","validationCode":"// Check availability before relying on the yt-dlp path\nif crate::core::ytdlp::find_ytdlp_cached().await.is_none() {\n    eprintln!(\"yt-dlp missing: install via Settings or PATH\");\n}","typeGuard":null,"tryCatchPattern":"match get_media_info(url).await {\n    Err(e) if e.to_string().contains(\"yt-dlp not found\") => prompt_ytdlp_install(),\n    other => other,\n}","preventionTips":["Install yt-dlp at setup time and verify it during app startup.","Allow an explicit ytdlp_path setting for non-PATH installs.","Re-scan for the binary after first-run installation instead of relying on cache."],"tags":["yt-dlp","missing-binary","dependency","external-tool"],"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"}