{"record":{"id":"07f3d6ae3417390c","repo":"tonhowtf/omniget","slug":"gallery-dl-is-not-available-install-gallery-dl-to-download","errorCode":null,"errorMessage":"gallery-dl is not available. Install gallery-dl to download from this site.","messagePattern":"gallery-dl is not available\\. Install gallery-dl to download from this site\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/gallerydl/mod.rs","lineNumber":203,"sourceCode":"        })\n    }\n\n    async fn download(\n        &self,\n        info: &MediaInfo,\n        opts: &DownloadOptions,\n        progress: mpsc::Sender<ProgressUpdate>,\n    ) -> anyhow::Result<DownloadResult> {\n        let url = info\n            .available_qualities\n            .first()\n            .map(|q| q.url.clone())\n            .ok_or_else(|| anyhow!(\"No gallery URL available\"))?;\n\n        let bin = omniget_core::core::dependencies::ensure_gallerydl()\n            .await\n            .ok_or_else(|| {\n                anyhow!(\n                    \"gallery-dl is not available. Install gallery-dl to download from this site.\"\n                )\n            })?;\n\n        std::fs::create_dir_all(&opts.output_dir)?;\n        let _ = progress.send(ProgressUpdate::percent(-2.0)).await;\n\n        let mut cmd = omniget_core::core::process::command(&bin);\n        cmd.arg(\"--no-colors\")\n            .arg(\"-D\")\n            .arg(&opts.output_dir)\n            .stdout(Stdio::piped())\n            .stderr(Stdio::piped());\n\n        if let Some(data_dir) = omniget_core::core::paths::app_data_dir() {\n            let archive_dir = data_dir.join(\"archive\");\n            if std::fs::create_dir_all(&archive_dir).is_ok() {\n                cmd.arg(\"--download-archive\")","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/gallerydl/mod.rs#L185-L221","documentation":"`ensure_gallerydl()` returned None, meaning the gallery-dl binary could not be located, installed, or updated. The gallery download path requires this external tool, so the operation is aborted with an installation hint.","triggerScenarios":"Calling gallerydl `download` when `ensure_gallerydl()` cannot find gallery-dl on PATH and its ensure/auto-install step fails (no network, unsupported platform, or install location not writable).","commonSituations":"gallery-dl never installed (it is not bundled), installed via pip into a venv not on the app's PATH, auto-update blocked by firewall/no network, or a read-only app data directory preventing the managed install.","solutions":["Install gallery-dl (`pip install gallery-dl` or download the standalone binary) and put it on PATH.","Verify with `gallery-dl --version` in the environment where the app runs.","Check network access and proxy settings if relying on the ensure/auto-download mechanism.","Ensure the install/cache directory used by ensure_gallerydl is writable."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Rust, before calling download\nif omniget_core::core::dependencies::ensure_gallerydl().await.is_none() {\n    return Err(anyhow!(\"gallery-dl is required; install it with 'pip install gallery-dl'\"));\n}","typeGuard":null,"tryCatchPattern":"// Rust\nlet bin = match ensure_gallerydl().await {\n    Some(b) => b,\n    None => {\n        log::warn!(\"gallery-dl missing; trying managed install\");\n        install_gallerydl().await? // fallback auto-install\n    }\n};","preventionTips":["Run a dependency health check at app startup and surface a clear install prompt.","Install gallery-dl into a location guaranteed to be on the app's PATH.","Check network/proxy availability if relying on automated download of the binary."],"tags":["dependency","gallery-dl","missing-binary"],"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"}