{"record":{"id":"dda9f9bfc975c92a","repo":"tonhowtf/omniget","slug":"vimeo-not-a-collection","errorCode":"vimeo:not_a_collection","errorMessage":"vimeo:not_a_collection","messagePattern":"vimeo:not_a_collection","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/vimeo.rs","lineNumber":854,"sourceCode":"        tail,\n        success: status.success(),\n    })\n}\n\nfn secret_refs<'a>(a: Option<&'a String>, b: Option<&'a String>) -> Vec<&'a str> {\n    [a, b]\n        .into_iter()\n        .flatten()\n        .map(|s| s.as_str())\n        .filter(|s| !s.trim().is_empty())\n        .collect()\n}\n\n/// Enumera um showcase, álbum, canal ou perfil.\npub async fn list(opts: &ListOptions, progress: &ProgressFn) -> Result<Listing> {\n    let target = parse_target(&opts.url).ok_or_else(|| anyhow!(\"vimeo:bad_url\"))?;\n    if !target.is_collection() {\n        return Err(anyhow!(\"vimeo:not_a_collection\"));\n    }\n    let url = target.canonical_url();\n    let bin = ytdlp_bin().await?;\n    let cookies = cookie_file(opts.session_netscape.as_deref());\n    let used_session = cookies.is_some();\n    let secrets = secret_refs(opts.showcase_password.as_ref(), None);\n    let args = list_args(\n        &url,\n        opts.showcase_password.as_deref(),\n        cookies.as_ref().map(|c| c.path.as_path()),\n    );\n    let command = safe_command_line(\"yt-dlp\", &args);\n    tracing::info!(\"[vimeo] $ {}\", command);\n    report(\n        progress,\n        ID_SHOWCASE,\n        \"progress\",\n        0,","sourceCodeStart":836,"sourceCodeEnd":872,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/vimeo.rs#L836-L872","documentation":"vimeo:not_a_collection is raised by `list` when the URL parses to a valid Vimeo target but that target is a single video (Target::Video), not a collection (showcase, album, channel, or user profile). `list` only enumerates multi-video containers; a single video must go through the single/private download paths instead.","triggerScenarios":"Calling `list(opts)` with `opts.url` set to a plain video link such as `https://vimeo.com/123456789`, a bare numeric id, or an unlisted link `https://vimeo.com/<id>/<hash>`.","commonSituations":"User pastes a normal video URL into the 'enumerate collection' feature; app routes a single-video job through the batch/backup list API by mistake; unlisted link with hash given where a showcase was expected.","solutions":["Use the single-video download API (e.g. the `private`/single path) instead of `list` when the URL is a video.","Confirm the URL points to a collection: it must be /showcase/<id>, /album/<id>, /channels/<name>, or /<username> — not /<numeric-id>.","In the UI, detect a numeric video id first and route to single-video flow before calling list.","If you truly meant to enumerate, get the showcase/album/channel URL from Vimeo and pass that."],"exampleFix":"// before\nawait vimeoList({ url: \"https://vimeo.com/76979871\" });\n// after\nconst m = url.match(/^https:\\/\\/vimeo\\.com\\/(\\d+)(\\/|$)/);\nif (m) {\n  await vimeoDownloadSingle({ url });\n} else {\n  await vimeoList({ url });\n}","handlingStrategy":"validation","validationCode":"const VIDEO_RE = /^(https:\\/\\/vimeo\\.com\\/\\d+(\\/[a-z0-9]+)?|\\d+)$/\n  .source;\nfunction looksLikeSingleVideo(u) {\n  const s = (u ?? \"\").trim();\n  return new RegExp(\"^(https:\\\\/\\\\/vimeo\\\\.com\\\\/\\\\d+(\\\\/[a-z0-9]+)?|\\\\d+)$\").test(s);\n}\nif (looksLikeSingleVideo(opts.url)) routeToSingleVideoApi(opts.url);","typeGuard":"function isCollectionUrl(u) {\n  return /vimeo\\.com\\/(showcase|album|channels)\\//.test((u ?? \"\").trim()) ||\n    /^https:\\/\\/vimeo\\.com\\/[a-zA-Z][\\w-]*$/.test((u ?? \"\").trim());\n}","tryCatchPattern":"try {\n  await vimeoList({ url });\n} catch (e) {\n  if (String(e).includes(\"vimeo:not_a_collection\")) {\n    showError(\"That is a single video; use the single-video downloader\");\n  } else throw e;\n}","preventionTips":["Parse the URL kind in the UI and route video vs collection automatically","Numeric-only URLs and /<id>/<hash> links are videos — never send them to list()","Keep a single URL-classification helper shared by all flows to avoid divergent routing"],"tags":["vimeo","wrong-api","target-type","input-error"],"backgroundTag":"incompatible-source-type","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"}