ubuntuandClaude Sonnet 5 4e596114c1 Rank channel search results by relevance, run search off the event loop
list_channel previously matched every playlist with one unranked
".*keyword.*" regex, so a specific channel name could be buried pages
behind unrelated names that merely contained the keyword mid-word.
Split matches into two tiers (word-boundary match first, then
anywhere-else) using a cheap count+skip/limit per tier so pagination
still avoids pulling every match into memory.

Also found while testing against a 1.19M-channel playlist: searching
scans an unindexed regex and can take several seconds, and it was
running synchronously inside the async handler, freezing every other
request/socket for that whole time. Moved it to run_in_executor;
verified a concurrent request now returns in ~2ms while a 3.6s search
is in flight.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 01:33:27 +00:00
2026-08-03 13:14:43 +00:00
2026-08-03 13:14:43 +00:00
2026-08-03 13:14:43 +00:00
S
Description
No description provided
1.7 MiB
Languages
HTML 51.1%
Python 38.7%
JavaScript 9.3%
Shell 0.7%
Dockerfile 0.2%