Vellum/internal/jellyfin
mithral 2c424ae67c Expose the television tree: catalog reads, API routes, Jellyfin shapes
The scanner builds library -> series -> season -> episode; this makes it
reachable. Three reads, all grant-checked through catalog.Store (ADR-005):
a series' seasons, a season's episodes, and the next unwatched episode.

Each loads the parent through ItemFor first, so forbidden and absent are the
same ErrNotFound, and the child query is scoped to the parent's own
library_id so a corrupt parent_id cannot cross a library boundary. Verified
red-green: swapping ItemFor for Item returns two rows to an ungranted
caller.

Episodes come back in episode order, not insertion order, and the ordering
is verified red-green too - dropping the clause yields [3 1 10 2].

Routes stay inside the existing family: /api/v1/items/{id}/seasons,
/episodes and /next. No parallel route surface.

Jellyfin gains SeriesDto, SeasonDto and EpisodeDto. Jellyfin's wire type is
BaseItemDto, so these carry the folder/file split plus IndexNumber and
ParentIndexNumber. ItemType now takes the item rather than the kind, because
an episode IS kind video - that is the one signature change, and the dto
tests were updated with it.

Verified end-to-end against a running server: a library holding S01E02,
1x02, a bare-number file and a film produced two series, three seasons and
six episodes, with the film left alone; the routes returned the seasons in
order, the episodes in episode order, and the next unwatched episode.

Note for later: Subsonic and the web UI are untouched, so a series browses
there as it did before. The scanner also has no separate 'tv' kind, so a
video library mixing films and shows builds both shapes side by side.
2026-10-12 01:41:05 -04:00
..
dto Expose the television tree: catalog reads, API routes, Jellyfin shapes 2026-10-12 01:41:05 -04:00
auth.go Waves 9-10: Jellyfin and Subsonic clients can browse and play 2026-10-11 15:05:43 -04:00
items.go Expose the television tree: catalog reads, API routes, Jellyfin shapes 2026-10-12 01:41:05 -04:00
jellyfin.go Serve the Jellyfin surface under /emby as well as at the root 2026-10-12 01:04:33 -04:00
jellyfin_test.go Expose the television tree: catalog reads, API routes, Jellyfin shapes 2026-10-12 01:41:05 -04:00
playback.go Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
query.go Expose the television tree: catalog reads, API routes, Jellyfin shapes 2026-10-12 01:41:05 -04:00
sessions.go Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
system.go Rate limit every surface that checks a password 2026-10-12 00:57:56 -04:00