tonhowtf/omniget · error

Dados do clip incompletos

Error message

Dados do clip incompletos

What it means

Raised by native_get_media_info when clip.broadcaster_login is None despite the clip record existing, i.e. the GraphQL response lacks /data/clip/broadcaster/login. The download layer requires the broadcaster login as the MediaInfo author field.

Solutions

  1. Check the raw GQL response for a partial-errors payload before treating data as complete
  2. Fall back to curator.login or the slug when broadcaster_login is missing
  3. Route to the yt-dlp fallback which derives the uploader independently

Example fix

// before
let broadcaster = clip.broadcaster_login.as_deref().ok_or_else(|| anyhow!("Dados do clip incompletos"))?;
// after
let broadcaster = clip.broadcaster_login.as_deref()
    .or(clip.curator_login.as_deref())
    .unwrap_or("unknown");
Defensive patterns

Strategy: fallback

Validate before calling

// Inspect the GQL clip JSON yourself before relying on native extraction:
let broadcaster_missing = json.pointer("/data/clip/broadcaster/login").is_none();

Try / catch

match downloader.get_media_info(url).await {
    Err(e) if e.to_string().contains("Dados do clip incompletos") => fallback_ytdlp_info(url).await,
    other => other,
}

Prevention

When it happens

Trigger: The GQL clip response omits or nulls the broadcaster object — e.g. a banned/deactivated broadcaster, partial GQL error responses, or schema changes renaming the field.

Common situations: The broadcaster account was banned or renamed so login is null; a partial GraphQL response (errors array plus null data fields) is treated as success.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/platforms/twitch.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)