{"record":{"id":"6a52af497cc588de","repo":"tonhowtf/omniget","slug":"no-hls-url-available-mod","errorCode":null,"errorMessage":"No HLS URL available","messagePattern":"No HLS URL available","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/bluesky/mod.rs","lineNumber":280,"sourceCode":"                    opts.filename_template.as_deref(),\n                    opts.referer.as_deref().or(Some(\"https://bsky.app\")),\n                    opts.cancel_token.clone(),\n                    None,\n                    opts.concurrent_fragments,\n                    false,\n                    &[],\n                    opts.audio_format.as_deref(),\n                )\n                .await;\n            }\n        }\n\n        match info.media_type {\n            MediaType::Video => {\n                let hls_url = &info\n                    .available_qualities\n                    .first()\n                    .ok_or_else(|| anyhow!(\"No HLS URL available\"))?\n                    .url;\n\n                let filename = format!(\"{}.mp4\", sanitize_filename::sanitize(&info.title));\n                let output_path = opts.output_dir.join(&filename);\n                let output_str = output_path.to_string_lossy().to_string();\n\n                let downloader =\n                    HlsDownloader::new().with_user_agent_override(opts.user_agent.clone());\n                let _ = progress.send(ProgressUpdate::percent(0.0)).await;\n\n                let result = downloader\n                    .download(\n                        hls_url,\n                        &output_str,\n                        \"https://bsky.app\",\n                        None,\n                        opts.cancel_token.clone(),\n                        20,","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/bluesky/mod.rs#L262-L298","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Retry later — the video may still be processing and the HLS rendition not yet published.","Log the raw video embed JSON to verify whether an HLS playlist URL exists upstream.","Fall back to the ytdlp generic downloader, which resolves Bluesky video streams independently.","Fix/update the extraction so a present playlist URL is actually stored in available_qualities."],"exampleFix":"// before\nlet hls_url = &info.available_qualities.first()\n    .ok_or_else(|| anyhow!(\"No HLS URL available\"))?.url;\n// after\nif info.available_qualities.is_empty() {\n    anyhow::bail!(\"No HLS URL available for {} (video may still be processing)\", info.title);\n}\nlet hls_url = &info.available_qualities[0].url;","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"let hls_url = match info.available_qualities.first() {\n    Some(q) => &q.url,\n    None => return fallback_ytdlp_download(url, &opts).await,\n};","preventionTips":["Fall back to ytdlp when no HLS qualities are present.","Treat empty quality lists on fresh uploads as 'processing' and retry with backoff.","Log raw video embed responses to detect upstream HLS extraction regressions."],"tags":["rust","bluesky","hls","missing-url"],"backgroundTag":"empty-result-set","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"}