tonhowtf/omniget · error · anyhow::Error
No gallery URL available
Error message
No gallery URL available
What it means
gallery-dl-based `download` extracts the gallery URL from the first entry of `available_qualities` and errors when the list is empty. The gallery-dl binary needs a target URL, so without one the download cannot start.
Solutions
- Re-run gallery info extraction to repopulate available_qualities before downloading.
- Verify the gallery URL extraction covers the specific site supported by gallery-dl.
- If the info step cannot populate URLs, construct MediaInfo directly from the user-supplied gallery URL.
- Update gallery-dl (`gallery-dl -U` or re-fetch) if site changes break extraction and leave the list empty.
Example fix
// before
let url = info.available_qualities.first().map(|q| q.url.clone()).ok_or_else(|| anyhow!("No gallery URL available"))?;
// after
let url = info
.available_qualities
.first()
.map(|q| q.url.clone())
.or_else(|| info.source_url.clone())
.ok_or_else(|| anyhow!("No gallery URL available (qualities empty)"))?; Defensive patterns
Strategy: validation
Validate before calling
// Rust, before calling download
if info.available_qualities.iter().all(|q| q.url.is_empty()) {
return Err(anyhow!("Gallery info carries no URL; re-extract gallery info"));
} Prevention
- Ensure the gallery info extraction step always populates at least the original gallery URL.
- Fall back to the user-supplied gallery URL when qualities extraction yields nothing.
- Keep gallery-dl updated so site changes do not silently produce empty URL lists.
When it happens
Trigger: Calling gallerydl `download` with MediaInfo whose `available_qualities` vec is empty — i.e. the gallery info step produced no URL entries.
Common situations: Gallery resolution succeeded partially (metadata found but no URL captured), unsupported gallery sites where URL extraction yields nothing, or stale MediaInfo reused after the original gallery page changed.
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
- No URL available
- No URL available
- No URL available
- No GIF URL available
- Track sem metadata pra resolver no YouTube
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/1240ca83227c8eb8.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/gallerydl/mod.rs:198
url: url.to_string(),
format: "gallery".to_string(),
}],
media_type: MediaType::Carousel,
file_size_bytes: None,
})
}
async fn download(
&self,
info: &MediaInfo,
opts: &DownloadOptions,
progress: mpsc::Sender<ProgressUpdate>,
) -> anyhow::Result<DownloadResult> {
let url = info
.available_qualities
.first()
.map(|q| q.url.clone())
.ok_or_else(|| anyhow!("No gallery URL available"))?;
let bin = omniget_core::core::dependencies::ensure_gallerydl()
.await
.ok_or_else(|| {
anyhow!(
"gallery-dl is not available. Install gallery-dl to download from this site."
)
})?;
std::fs::create_dir_all(&opts.output_dir)?;
let _ = progress.send(ProgressUpdate::percent(-2.0)).await;
let mut cmd = omniget_core::core::process::command(&bin);
cmd.arg("--no-colors")
.arg("-D")
.arg(&opts.output_dir)
.stdout(Stdio::piped())
.stderr(Stdio::piped());View on GitHub (pinned to 8600b91f42)