Repository navigation
Add flowsheet show and djs playlists --full for complete past shows - #13
Merged
Merged
Conversation
`djs playlists` returns only a four-entry preview per show, and the CLI had no way to fetch the rest. The backend already serves a show's complete flowsheet at GET /flowsheet/playlist?show_id=N (public, 404 when missing). - api.Client.Show wraps that endpoint (typed + raw, per the read convention) - `wxyc flowsheet show <show_id>` lists every entry of one show; the table is in play order (the server sends newest-first), --json is the server body - `wxyc djs playlists --full` fetches every listed show: one row per track, or with --json an array of the full show bodies, byte-for-byte Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open
3 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.
Why
wxyc djs playlistsreturns only a 4-entrypreviewper show (the backend slices it indjs.service.ts), and the CLI had no command that returns a show's full track list — so there was no way to get a DJ's complete past playlists. The backend already serves exactly that atGET /flowsheet/playlist?show_id=N(getShowInfo; public, 404 for an unknown show); the CLI just never called it.What
api.Client.Show(showID)— wraps/flowsheet/playlist, returning the decodedShowplus raw bytes, per the read-command convention. Onlyid,start_time,end_time, andentriesare modeled; everything else (legacy_dj_name,previous_show_id/next_show_id,show_djs, …) rides through--json.wxyc flowsheet show <show_id>— every entry of one show. The table is sorted into play order (the server sends entries newest-first);--jsonis the server body untouched.wxyc djs playlists --full— fetches each listed show (one request per show). Table: one row per track (DATE SHOW ARTIST TRACK ALBUM), markers dropped.--json: an array of the full show bodies, each byte-for-byte. A show that fails to fetch fails the command, naming the show id.Playlistdoc comment (which said no full-list endpoint existed) updated.Tests
Red-green throughout: new
httptestfixtures mirror the real/flowsheet/playlistshape (metadata spread at top level,entries, adjacent ids), each watched failing before the implementation.go vet ./...andgo test ./...pass.Also checked live against production:
flowsheet showon a recent show lists all 26 tracks in play order, an unknown id exits 5 (HTTP 404: Show 1 not found), anddjs playlists --fullreturns every track of all 9 shows linked to my account.Not in scope
djs playlistsstill lists only shows linked throughshow_djs, so legacy tubafrenzy-era shows (which carry onlylegacy_dj_name) don't appear — that's the backend's WXYC/Backend-Service#2898, not something the CLI can fix.🤖 Generated with Claude Code