tonhowtf/omniget · error · anyhow::Error

Dados do clip incompletos

Error message

Dados do clip incompletos

What it means

A shape guard over clip metadata: fetch_clip_metadata succeeded but the parsed ClipMetadata is missing required fields (broadcaster, duration, thumbnail, etc.), so a MediaInfo cannot be built. The Twitch GQL response was truncated or changed schema — the slug itself was resolved fine.

Solutions

  1. Retry — transient partial GQL responses do occur
  2. Update the app so its GQL parsing matches Twitch's current schema
  3. Fall back to the yt-dlp path for this clip if the native mode keeps failing
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at src-tauri/src/platforms/twitch/mod.rs:62 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src-tauri/src/platforms/twitch/mod.rs:62

        let ytdlp_path = crate::core::ytdlp::ensure_ytdlp().await?;
        let json = crate::core::ytdlp::get_video_info(&ytdlp_path, url, &[]).await?;
        crate::platforms::generic_ytdlp::GenericYtdlpDownloader::parse_video_info(&json)
    }

    async fn native_get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {
        let slug =
            Self::extract_clip_slug(url).ok_or_else(|| anyhow!("Could not extract clip slug"))?;

        let clip = self.fetch_clip_metadata(&slug).await?;

        if clip.video_qualities.is_empty() {
            return Err(anyhow!("No video quality available"));
        }

        let broadcaster = clip
            .broadcaster_login
            .as_deref()
            .ok_or_else(|| anyhow!("Dados do clip incompletos"))?;

        let token = self.fetch_access_token(&slug).await?;

        let clip_title = clip.title.trim().to_string();

        let available_qualities: Vec<VideoQuality> = clip
            .video_qualities
            .iter()
            .map(|q| {
                let height: u32 = q.quality.parse().unwrap_or(0);
                let authenticated_url = Self::build_authenticated_url(&q.source_url, &token);
                VideoQuality {
                    label: format!("{}p", q.quality),
                    width: 0,
                    height,
                    url: authenticated_url,
                    format: "mp4".to_string(),
                }

View on GitHub (pinned to 8600b91f42)