tonhowtf/omniget · error · anyhow::Error

No HLS URL available

Error message

No HLS URL available

What it means

In `download` (src-tauri/src/platforms/bluesky/mod.rs:280), the resolved MediaInfo is a video but `available_qualities` is empty, so taking `.first()` fails and the code raises "No HLS URL available". The HLS stream URL never made it from extraction into the media info structure.

Solutions

  1. Retry later — the video may still be processing and the HLS rendition not yet published.
  2. Log the raw video embed JSON to verify whether an HLS playlist URL exists upstream.
  3. Fall back to the ytdlp generic downloader, which resolves Bluesky video streams independently.
  4. Fix/update the extraction so a present playlist URL is actually stored in available_qualities.

Example fix

// before
let hls_url = &info.available_qualities.first()
    .ok_or_else(|| anyhow!("No HLS URL available"))?.url;
// after
if info.available_qualities.is_empty() {
    anyhow::bail!("No HLS URL available for {} (video may still be processing)", info.title);
}
let hls_url = &info.available_qualities[0].url;
Defensive patterns

Strategy: fallback

Try / catch

let hls_url = match info.available_qualities.first() {
    Some(q) => &q.url,
    None => return fallback_ytdlp_download(url, &opts).await,
};

Prevention

When it happens

Trigger: `extract_media` produced `BlueskyMedia::Video` but the subsequent mapping into `available_qualities` produced an empty list — e.g. the video is still processing/encoding on Bluesky's CDN, the playlist URL was missing from the API response, or a mapping bug dropped the quality entry.

Common situations: Very recently uploaded videos whose HLS transcodes aren't ready yet; geo/CDN restrictions stripping the playlist URL; Bluesky changing the video embed response shape so the HLS URL extraction yields nothing.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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

Appendix: source

Thrown at src-tauri/src/platforms/bluesky/mod.rs:280

                    opts.filename_template.as_deref(),
                    opts.referer.as_deref().or(Some("https://bsky.app")),
                    opts.cancel_token.clone(),
                    None,
                    opts.concurrent_fragments,
                    false,
                    &[],
                    opts.audio_format.as_deref(),
                )
                .await;
            }
        }

        match info.media_type {
            MediaType::Video => {
                let hls_url = &info
                    .available_qualities
                    .first()
                    .ok_or_else(|| anyhow!("No HLS URL available"))?
                    .url;

                let filename = format!("{}.mp4", sanitize_filename::sanitize(&info.title));
                let output_path = opts.output_dir.join(&filename);
                let output_str = output_path.to_string_lossy().to_string();

                let downloader =
                    HlsDownloader::new().with_user_agent_override(opts.user_agent.clone());
                let _ = progress.send(ProgressUpdate::percent(0.0)).await;

                let result = downloader
                    .download(
                        hls_url,
                        &output_str,
                        "https://bsky.app",
                        None,
                        opts.cancel_token.clone(),
                        20,

View on GitHub (pinned to 8600b91f42)