feat: add a Music tab fed by TPB, 1337x, and BitTorrented - #150
Open
ugurckr wants to merge 1 commit into
Open
Conversation
Music is the one big category the curated list had no answer for: someone after an album had to search Movies and hope. All three sources already carry it, so the tab costs three new source entries, not a new integration. Each source gets its own id rather than a second group on an existing one, because each asks its site a different question: apibay by category set, 1337x by its Music search path, BitTorrented by media type. Separate ids also keep per-source health and outage reporting honest per tab. What counts as music is drawn tightly. TPB takes 101 (music) and 104 (FLAC), where most lossless rips land. Music videos (203) stay video and audio books (102) are not music, so neither is admitted. BitTorrented is asked for type=audio, so the tab structurally cannot show video rows. One existing behaviour changes with it: the apibay category filter now runs over browse feeds as well as searches. It has to. apibay publishes no top-100 for music alone, so the empty-query feed is the parent Audio list — music and audio books mixed together. Movies and TV browse their own leaf feeds (207, 208), which their category sets already admit, so the filter is a no-op there; there is a test pinning exactly that. A row that carries no category at all is kept rather than dropped: an unfiled row beats an empty tab.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Music is the one large category the curated list has no answer for: someone after an album has to
search Movies and hope. All three general sources already carry it, so the tab costs three source
entries, not a new integration.
/category-search/…/Music/path,/popular-musicwhen browsingtype=audioEach gets its own source id rather than a second group on an existing entry, because each asks its
site a different question. Separate ids also keep per-source health and the outage line
("Couldn't reach Music. All 3 sources may be down") honest per tab.
What counts as music
Drawn tightly on purpose:
filling a phone with albums doesn't want them.
type=audio, so the tab structurally cannot show a video row —the same instinct as the existing video-only restriction, not a name-based filter after the fact.
One existing behaviour changes
The apibay category filter now runs over browse feeds as well as searches (
if (q && …)→if (it.category && …)).It has to: apibay publishes no top-100 for music alone, so the empty-query feed is the parent
Audio list — music and audio books mixed together. Without the filter, the Music tab's browse view
opens full of audio books.
Movies and TV browse their own leaf feeds (207, 208), which their category sets already admit, so
the filter is a no-op for them. There's a test pinning exactly that so the change can't quietly
regress either tab. A row carrying no category at all is kept rather than dropped — an unfiled row
beats an empty tab.
Grain notes
MediaTypeinbittorrented.tsandCategory+POPULARinx1337.tsreplace the inline"Movies" | "TV"unions and thecat === "Movies" ? … : …ternary, so adding the third valuewas a table entry rather than another branch.
Storefields, no palette or gradient changes. The two new source tags reusetheir site's existing colour, since the tag answers who found this row, not what kind it is.
Tests
piratebay.test.tsis new (8 cases): the music category boundary including the 203/102exclusions, the browse-feed filter, the unfiled-row rule, and regression guards that Movies and TV
filtering is unchanged in both search and browse. Plus wiring cases in
x1337.test.tsandbittorrented.test.ts.npm testgoes from 229 to 237 passing.Checklist
npm run typecheckis cleannpm testpassesHELP_GROUPSandfooterHintsinsrc/ui/keymap.tsStorefield, I updatedmakeStoreinscripts/render-previews-impl.tsxfeat:/fix:/docs:/chore:)