{"record":{"id":"0e370b3584e4dc2e","repo":"tonhowtf/omniget","slug":"yt-dlp-not-found-0e370b","errorCode":null,"errorMessage":"yt-dlp not found","messagePattern":"yt-dlp not found","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/tiktok/mod.rs","lineNumber":579,"sourceCode":"                                duration_seconds: info.duration_seconds.unwrap_or(0.0),\n                                torrent_id: None,\n                            });\n                        }\n                        Err(e) => {\n                            tracing::warn!(\n                                \"[tiktok] direct download failed: {}, falling back to yt-dlp\",\n                                e\n                            );\n                            let _ = tokio::fs::remove_file(&output).await;\n                        }\n                    }\n                }\n\n                let ytdlp_path = match &opts.ytdlp_path {\n                    Some(p) => p.clone(),\n                    None => crate::core::ytdlp::find_ytdlp_cached()\n                        .await\n                        .ok_or_else(|| anyhow!(\"yt-dlp not found\"))?,\n                };\n\n                crate::core::ytdlp::download_video(\n                    &ytdlp_path,\n                    &quality.url,\n                    &opts.output_dir,\n                    None,\n                    progress,\n                    opts.download_mode.as_deref(),\n                    None,\n                    opts.filename_template.as_deref(),\n                    opts.referer.as_deref().or(Some(\"https://www.tiktok.com/\")),\n                    opts.cancel_token.clone(),\n                    None,\n                    opts.concurrent_fragments,\n                    false,\n                    &[],\n                    opts.audio_format.as_deref(),","sourceCodeStart":561,"sourceCodeEnd":597,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/tiktok/mod.rs#L561-L597","documentation":"When a TikTok video cannot be downloaded via the direct URL (format != tiktok_direct), download() falls back to yt-dlp. If opts.ytdlp_path is None and find_ytdlp_cached() cannot locate an installed yt-dlp binary, this error aborts the download.","triggerScenarios":"download() called on a Video MediaInfo whose quality format is not tiktok_direct (yt-dlp path needed), with no ytdlp_path in DownloadOptions and no yt-dlp found on the system.","commonSituations":"Embedded/live-photo/slideshow content requiring yt-dlp; fresh install without yt-dlp; yt-dlp uninstalled or not on PATH after an environment change.","solutions":["Install yt-dlp from the app's Settings screen.","Pass DownloadOptions { ytdlp_path: Some(path_to_ytdlp), .. } explicitly.","Install yt-dlp system-wide and ensure it is on PATH.","Restart the app after installing so find_ytdlp_cached() re-scans."],"exampleFix":"// before\nNone => crate::core::ytdlp::find_ytdlp_cached()\n    .await\n    .ok_or_else(|| anyhow!(\"yt-dlp not found\"))?,\n// after\nNone => crate::core::ytdlp::find_ytdlp_cached()\n    .await\n    .ok_or_else(|| anyhow!(\"yt-dlp not found — install it in Settings or set ytdlp_path\"))?,","handlingStrategy":"validation","validationCode":"// Ensure a yt-dlp binary exists before requesting non-direct downloads\nlet ytdlp = opts.ytdlp_path.clone()\n    .or_else(|| { let found = find_ytdlp_cached(); found });\nif ytdlp.is_none() { eprintln!(\"configure yt-dlp before downloading this quality\"); }","typeGuard":null,"tryCatchPattern":"match download(info, opts).await {\n    Err(e) if e.to_string().contains(\"yt-dlp not found\") => show_ytdlp_install_dialog(),\n    other => other,\n}","preventionTips":["Set DownloadOptions.ytdlp_path explicitly in programmatic use.","Install yt-dlp and verify on PATH before triggering downloads.","Keep the bundled yt-dlp updated so the cached lookup stays valid."],"tags":["yt-dlp","missing-binary","download","dependency"],"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"}