Skip to content

feat: list the sites yt-dlp downloads from, with their logos - #33

Merged
houko merged 1 commit into
mainfrom
feat/supported-sites
Nov 9, 2026
Merged

houko merged 1 commit into
mainfrom
feat/supported-sites

Conversation

@houko

@houko houko commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

Kando downloads every link through yt-dlp, so whether a site works depends entirely on yt-dlp, but nothing in the app said which sites those are. A failed link only showed "xxx 暂不支持".

This adds a 支持的网站 sheet listing the 929 websites the yt-dlp snapshot (2026.08.19) downloads from, each with its logo:

  • Search by name, domain or extractor name, or paste a link to see whether its site is on the list (youtu.be/… finds YouTube, x.com/… finds X).
  • A site off the list gets a short note that a page with a standard video or a direct video/m3u8 link may still work through yt-dlp's generic extractor.
  • Well-known sites come first (YouTube, 哔哩哔哩, 抖音, TikTok, X, niconico, 爱奇艺, 腾讯视频, 芒果 TV, ABEMA, TVer, …), then the rest by name.
  • Entry points: 帮助 › 支持的网站…, a 查看支持的网站 action on the 暂不支持 card, and a 支持的网站… button on the empty library page.

How the list is made

apps/kando/sites/catalog embeds sites.json and logos/. gen.go (//go:build ignore, run with go generate ./sites/catalog from apps/kando) regenerates both:

  • Imports yt_dlp through the Python interpreter of the yt-dlp on PATH and lists every working, non-hidden extractor except generic (1594 of 1751; 136 marked broken by yt-dlp are left out).
  • Groups extractors into sites by the registrable domain (golang.org/x/net/publicsuffix, already in the module graph) of each extractor's first test URL, which skips embed and mirror hosts.
  • Fetches each domain's 64px favicon from Google's favicon service. 860 of 929 have one (about 0.9 MB in total); the rest show their initial on a colored plate.
  • -logos=false regenerates the list and keeps the logos already on disk.

The sheet uses ui.GridView, so only the visible tiles are built, and logos are decoded the first time their tile shows, then cached on the app.

Screenshots

The 暂不支持 card, before and after:

before: unsupported card
after: unsupported card with 查看支持的网站

The sheet (new):

supported sites sheet
search by name
search by link
site not on the list

Notes

  • The logos are the sites' own favicons, shown only to identify which site a link belongs to.
  • The list is a snapshot. It does not follow the user's installed yt-dlp version, so regenerate it when bumping the recommended yt-dlp.

Test plan

  • CGO_ENABLED=0 go test ./packages/core/... ./packages/media/... ./apps/kando/... passes
  • go tool mygo vet . in apps/kando is clean
  • New tests: catalog ordering, uniqueness, every logo embedded and decodable with no orphans, search by name/alias/link; the sheet opens from the help menu, the remedy card and the empty library, holds the modal flag, takes focus in the search, and closes with 完成 or Escape (the first Escape clears the search)
  • KANDO_SCREENSHOTS=… go test -run TestScreenshotsSites renders the scenes above

Add a 支持的网站 sheet listing the 929 websites the bundled yt-dlp snapshot (2026.08.19) downloads from, each with its logo, searchable by name, domain, or a pasted link. It opens from 帮助 › 支持的网站…, from the 暂不支持 card of a site yt-dlp does not know, and from the empty library page.

The list lives in apps/kando/sites/catalog: sites.json and logos/ are embedded, and gen.go regenerates them from the yt-dlp on PATH with `go generate ./sites/catalog`.
@github-actions github-actions Bot added area: app The app shell and state in apps/kando area: ui The screens: sidebar, films, film, settings, account and cheatsheet feature A new feature (feat) size/XL 1000 or more changed lines labels Nov 9, 2026
@houko
houko merged commit 56cc19f into main Nov 9, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: app The app shell and state in apps/kando area: ui The screens: sidebar, films, film, settings, account and cheatsheet feature A new feature (feat) size/XL 1000 or more changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant