tonhowtf/omniget · error

Playlist empty or unavailable

Error message

Playlist empty or unavailable

What it means

When the URL is detected as a playlist/series, `get_media_info` fetches playlist metadata via `ytdlp::get_playlist_info`; if the returned entry list is empty the function treats the playlist as unusable and throws `Playlist empty or unavailable`. It guards downstream code that assumes at least one entry.

Solutions

  1. Open the URL in a browser to confirm the playlist actually contains playable videos.
  2. Refresh yt-dlp to the latest version (`yt-dlp -U`) — Bilibili layouts change often.
  3. Add login cookies/credentials so private or members-only entries are extractable.
  4. Retry later or use the direct video URL of an individual item instead of the collection URL.

Example fix

// before
let info = get_media_info("https://www.bilibili.com/medialist/...empty...", ).await?;
// after
let entries = probe_playlist(&url).unwrap_or_default();
if !entries.is_empty() { let info = get_media_info(&url).await?; }
Defensive patterns

Strategy: validation

Validate before calling

// before calling get_media_info on a playlist URL
let entries = ytdlp::get_playlist_info(&ytdlp_path, url, &extra).await?.1;
if entries.is_empty() { /* surface 'playlist unavailable' before the download path */ }

Try / catch

match get_media_info(url).await {
    Err(e) if e.to_string().contains("Playlist empty") => show_unavailable_playlist_msg(url),
    Err(e) => return Err(e),
    Ok(info) => info,
}

Prevention

When it happens

Trigger: Calling `get_media_info` with a Bilibili playlist/collection URL whose yt-dlp extraction returns zero entries — deleted/private videos, region-locked collections, login-required content, or yt-dlp failing silently and yielding an empty entries vector.

Common situations: Fetching a season/collection whose videos were removed or made members-only; passing a URL that looks like a playlist but points to an empty favourites folder; missing cookies for login-gated content; outdated yt-dlp that cannot parse a new Bilibili page layout.

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/8e90b34648893a85. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/src/platforms/bilibili/legacy.rs:44

pub fn bilibili_extra_flags() -> Vec<String> {
    vec![
        "--referer".to_string(),
        "https://www.bilibili.com".to_string(),
    ]
}

pub async fn get_media_info(url: &str) -> anyhow::Result<MediaInfo> {
    let ytdlp_path = ytdlp::find_ytdlp_cached()
        .await
        .ok_or_else(|| anyhow!("yt-dlp not found"))?;

    let extra = bilibili_extra_flags();

    if is_playlist_or_series(url) {
        let (title, entries) = ytdlp::get_playlist_info(&ytdlp_path, url, &extra).await?;

        if entries.is_empty() {
            return Err(anyhow!("Playlist empty or unavailable"));
        }

        let qualities: Vec<MediaVideoQuality> = entries
            .iter()
            .enumerate()
            .map(|(i, e)| MediaVideoQuality {
                label: format!("{}. {}", i + 1, e.title),
                width: 0,
                height: 0,
                url: e.url.clone(),
                format: "mp4".to_string(),
            })
            .collect();

        return Ok(MediaInfo {
            title,
            author: "Bilibili".to_string(),
            platform: "bilibili".to_string(),

View on GitHub (pinned to 8600b91f42)