tonhowtf/omniget · error · anyhow::Error

Vimeo requer yt-dlp para funcionar. Falha ao obter yt-dlp

Error message

Vimeo requer yt-dlp para funcionar. Falha ao obter yt-dlp: {}

What it means

Thrown by VimeoDownloader::get_media_info when ytdlp::ensure_ytdlp() fails, i.e. the yt-dlp binary could not be located or downloaded. Vimeo support in this codebase is implemented exclusively through yt-dlp, so without the binary Vimeo extraction cannot proceed. The original ensure_ytdlp error is embedded in the message.

Solutions

  1. Install yt-dlp manually and make sure it is on PATH (pip install yt-dlp or the official installer).
  2. Check the embedded cause in the message ('Falha ao obter yt-dlp: {}') for the concrete failure (download error, permission denied, etc.).
  3. Ensure network access if the app must auto-download yt-dlp.
  4. Verify the app has write permission to the directory where yt-dlp is stored.
  5. Upgrade the app if the platform is unsupported by the bundled downloader.

Example fix

// before: propagate opaque ensure_ytdlp failure
let ytdlp_path = ytdlp::ensure_ytdlp().await.map_err(|e| {
    anyhow!("Vimeo requer yt-dlp para funcionar. Falha ao obter yt-dlp: {}", e)
})?;
// after: check a user-provided binary first
let ytdlp_path = match std::env::var_os("YTDLP_PATH") {
    Some(p) => std::path::PathBuf::from(p),
    None => ytdlp::ensure_ytdlp().await.map_err(|e| {
        anyhow!("Vimeo requer yt-dlp para funcionar. Falha ao obter yt-dlp: {}", e)
    })?,
};
Defensive patterns

Strategy: validation

Validate before calling

// verify yt-dlp availability before attempting Vimeo extraction
match ytdlp::ensure_ytdlp().await {
    Ok(path) => println!("yt-dlp ready at {:?}", path),
    Err(e) => eprintln!("set up yt-dlp first: {}", e),
}

Type guard

fn ytdlp_available(path: &std::path::Path) -> bool {
    path.exists() && std::fs::metadata(path).map(|m| m.len() > 0).unwrap_or(false)
}

Try / catch

match downloader.get_media_info(&vimeo_url).await {
    Err(e) if e.to_string().contains("requer yt-dlp") => {
        // guide the user to install yt-dlp or set YTDLP_PATH, then retry
        prompt_ytdlp_install();
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling get_media_info (or download) on a Vimeo URL when ensure_ytdlp fails: the binary is not installed, not on PATH, the auto-download fails (no network, no write permission to the target directory), or the downloaded binary cannot be executed.

Common situations: Fresh installs where yt-dlp hasn't been downloaded yet and the machine is offline; restricted install directories (no write permission); antivirus/OS blocking the downloaded binary; unsupported platform/arch.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/6d31ac04186af7ea. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/src/platforms/vimeo/mod.rs:130

#[async_trait]
impl PlatformDownloader for VimeoDownloader {
    fn name(&self) -> &str {
        "vimeo"
    }

    fn can_handle(&self, url: &str) -> bool {
        if let Ok(parsed) = url::Url::parse(url) {
            if let Some(host) = parsed.host_str() {
                let host = host.to_lowercase();
                return host == "vimeo.com" || host.ends_with(".vimeo.com");
            }
        }
        false
    }

    async fn get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {
        let ytdlp_path = ytdlp::ensure_ytdlp().await.map_err(|e| {
            anyhow!(
                "Vimeo requer yt-dlp para funcionar. Falha ao obter yt-dlp: {}",
                e
            )
        })?;

        let json = ytdlp::get_video_info(&ytdlp_path, url, &[]).await?;
        Self::parse_video_info(&json)
    }

    async fn download(
        &self,
        info: &MediaInfo,
        opts: &DownloadOptions,
        progress: mpsc::Sender<ProgressUpdate>,
    ) -> anyhow::Result<DownloadResult> {
        let _ = progress.send(ProgressUpdate::percent(0.0)).await;

        let ytdlp_path = ytdlp::ensure_ytdlp().await?;

View on GitHub (pinned to 8600b91f42)