Add a lineup model that retains every provider position - #18
Merged
daniel-widrick merged 1 commit intoSep 13, 2026
Merged
Conversation
TVGuide gains Lineup, a list of channel positions keyed by number and station that is never collapsed, and Source, which records the lineup the guide was built from. Resolved station logos are copied onto each position, the image proxy rewrite covers them, and the Jellyfin channel filter applies to them by channel number. ChannelNumberLess moves into the guide package with a strict ordering: numeric numbers first, ties broken by string, then non-numeric.
daniel-widrick
force-pushed
the
feature/lineup-model
branch
from
September 13, 2026 03:34
f9572f8 to
57eac5b
Compare
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.
PR 2 of #15. Stacked on #17.
Changes
guide.TVGuidegainsLineup []LineupPositionandSource. A position is one channel number carrying one station; the same station at two numbers is two positions. Keyed by number plus station ID, since Gracenote's rowidis just the station ID with a row index appended and is not stable.guide.ConvertLineupPosition,guide.SortLineup, andguide.SourceFromPreferencesare new.ChannelNumberLessmoves frommainintoguidewith a strict ordering (numeric first, ties by string, then non-numeric).BASE_URLproxy rewrite, now arewriteImageURLshelper, covers position logos. The Jellyfin channel filter applies to positions by channel number and carriesSourcethrough.Channelsis still the deduplicated station list the template renders.Tests
guide: position conversion and key distinctness, comparator table including numeric/non-numeric mixes and equal-value ties, sort order with tie-breaking, source mapping.main: logo propagation to every position of a station, proxy rewrite over channels, positions, programs, and images including empty-URL handling, channel filter over positions with source carried through.