tonhowtf/omniget · error
No GIF URL available
Error message
No GIF URL available
What it means
Thrown in BlueskyDownloader::download for MediaType::Gif when available_qualities is empty, so no GIF URL exists to download. Like the HLS case, it indicates a MediaInfo whose media_type claims a GIF but carries no quality entries.
Solutions
- Ensure at least one VideoQuality with the Tenor GIF URL is present before download().
- Re-run get_media_info on the original post URL to rebuild the MediaInfo.
- Skip download and report 'no GIF URL' gracefully in the caller.
Example fix
// before
let info = MediaInfo { media_type: MediaType::Gif, available_qualities: vec![], .. };
// after
let info = MediaInfo { media_type: MediaType::Gif,
available_qualities: vec![VideoQuality { label: "original".into(), url: gif_url, format: "gif".into(), .. }], .. }; Defensive patterns
Strategy: validation
Validate before calling
if info.media_type == MediaType::Gif && info.available_qualities.first().map_or(true, |q| q.url.is_empty()) {
return Err(anyhow!("GIF MediaInfo has no url; refetch via get_media_info"));
} Type guard
fn has_gif_url(info: &MediaInfo) -> bool {
matches!(info.media_type, MediaType::Gif)
&& info.available_qualities.first().map_or(false, |q| !q.url.is_empty())
} Try / catch
match downloader.download(&info, &opts, tx).await {
Err(e) if e.to_string() == "No GIF URL available" => {
eprintln!("GIF url missing; refetching info");
let fresh = downloader.get_media_info(&original_url).await?;
downloader.download(&fresh, &opts, tx).await
}
other => other,
} Prevention
- Always populate available_qualities with the Tenor URL for GIF media
- Keep the original post URL alongside MediaInfo so you can re-fetch on inconsistency
- Validate MediaInfo before handing it to download()
When it happens
Trigger: download() called with a GIF-typed MediaInfo whose available_qualities vec is empty — e.g. built manually or stripped by a filter.
Common situations: Custom tooling constructing MediaInfo for Tenor GIFs without populating the url, or code clearing qualities after a failed prefetch.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- No HLS URL available
- Unsupported media type for download
- Nenhum URL GIF
- Track sem metadata pra resolver no YouTube
- download falhou: HTTP
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/c017f7373611471d.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/bluesky.rs:357
total_bytes += bytes;
last_path = output;
let percent = ((i + 1) as f64 / count as f64) * 100.0;
let _ = progress.send(ProgressUpdate::percent(percent)).await;
}
Ok(DownloadResult {
file_path: last_path,
file_size_bytes: total_bytes,
duration_seconds: 0.0,
torrent_id: None,
})
}
MediaType::Gif => {
let gif_url = &info
.available_qualities
.first()
.ok_or_else(|| anyhow!("No GIF URL available"))?
.url;
let filename = format!("{}.gif", sanitize_filename::sanitize(&info.title));
let output = opts.output_dir.join(&filename);
let bytes = direct_downloader::download_direct(
&self.client,
gif_url,
&output,
progress,
Some(&opts.cancel_token),
)
.await?;
Ok(DownloadResult {
file_path: output,
file_size_bytes: bytes,
duration_seconds: 0.0,View on GitHub (pinned to 8600b91f42)