tonhowtf/omniget · error

Playlist empty or unavailable

Error message

Playlist empty or unavailable

What it means

In get_media_info, when the URL is detected as a playlist/series, get_playlist_info is called and if the returned entries list is empty the function errors with 'Playlist empty or unavailable'. It means yt-dlp saw the URL as a playlist but returned zero usable items.

Solutions

  1. Open the playlist URL in a browser to confirm it is public and has items
  2. Retry; anti-bot or transient failures can yield empty results
  3. Update yt-dlp if Bilibili changed its playlist API shape
  4. Pass cookies if the playlist requires login to view

Example fix

// before
if entries.is_empty() {
    return Err(anyhow!("Playlist empty or unavailable"));
}
// after
if entries.is_empty() {
    tracing::warn!("playlist returned 0 entries for {url}");
    return Err(anyhow!("Playlist empty or unavailable"));
}
Defensive patterns

Strategy: try-catch

Validate before calling

// ensure the playlist URL is publicly reachable first
let resp = reqwest::get(url).await?;
if !resp.status().is_success() {
    return Err(anyhow!("Playlist page not accessible ({})", resp.status()));
}

Try / catch

match get_media_info(url).await {
    Err(e) if e.to_string().contains("Playlist empty") => {
        eprintln!("Verify the playlist is public and has items, then retry");
    }
    other => other,
}

Prevention

When it happens

Trigger: is_playlist_or_series(url) is true, get_playlist_info succeeds, but entries.is_empty(): private/deleted playlists, region-locked collections, or playlists whose items were all removed.

Common situations: Sharing links to private Bilibili collections/favorites lists, deleted or made-private playlists, or scraper/anti-bot responses returning an empty item list.

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/53c786ab613e0024. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/platforms/bilibili/legacy.rs:78

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)