Repository navigation
Series ranges: an omnibus of books 1-3 is numbered 1-3 - #133
Merged
Merged
Conversation
A series position may be a range (#130). The series_index field takes "1-3" (also "1 - 3" and the en dash; 0 < start < end <= 100000, a span of at most 100), stored as its start in series_index and its end in the new series_index_end (migration 0045, with book_more_series.position_end for an other series' range). Players keep reading series_index as the start; the Book JSON adds series_index_end and series_list[].position_end, both omitempty. A series-part tag of "1-3" reads as a range; paths are left alone. The next book after a range continues after its end, a single book wins a tie with an omnibus starting at the same place, and a book inside an omnibus in a higher-ranked series steps back. Community rails read a "1-3" entry as a range: it holds a local book at that range (an entry at one number takes a range book starting there when no single book is), and the next entry counts from the current work's end. A community match writes a range position instead of dropping it, a series swap carries a range both ways, the series aggregate's positions hold every slot inside a range, and the export writes series_position "1-3". The console's Series number takes a range, shows #1-3, and the Series cards let a range book (or a range rail entry) hold every slot in it.
metadata.ParseSeriesPosition (a number or a range) serves the probe and catalog.ParseSeriesPosition; ValidSeriesRange drops a NaN/Inf guard its comparisons already make; the path baseline keeps a range's end; seriesSwap scans the main series as a SeriesRef; rail placement finds an omnibus in the same pass. Admin console: formatSeriesPosition is the one range formatter, validSeriesRange mirrors the Go check (no string round trip for a stored entry), positionIn goes (spanIn replaced it) and formatPositions takes spans.
A match (the dialog and a bulk run) sends an omnibus's position as "1-3", which metaserve compares as a span, never as book 1's "1"; the bulk run's subject query reads series_index_end. The book page byline reads "book 1-3 in ...". The /meta bundle's previous works take a range when it ends before the current work starts, counting a current range from its start (as the player's previousWorks does). The console refuses a stored more_series entry whose range has a string start, as the server does.
KodeStar
force-pushed
the
feat/series-ranges
branch
from
October 14, 2026 10:21
ea7f22c to
216e491
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.
Fixes #130.
A series position may now be a range (an omnibus of books 1-3). Typing
1-3in Series number used to be refused, and community rail entries at "1-3" were treated as unnumbered.Wire (additive, omitempty): a player
Book, a favourite and a/fsbook entry keepseries_indexas the range's start (shipped players read the omnibus as book 1) and addseries_index_end;series_listentries addposition_end./seriespositionslist every slot a range covers. Export writesseries_position"1-3".Server: migration 0045 (
books.series_index_end,book_more_series.position_end); one parser (metadata.ParseSeriesPosition, bounds: start > 0, end > start, end <= 100000, span <= 100); overrides, revert, series swap andmore_series("Omnibus #1-3") carry the range; aseries-parttag "1-3" reads as a range on its next scan (existing books need a rescan); next-in-series continues after a range's end and a single book beats an omnibus starting at the same place; community rail placement, previous works and matching (works/matchgets "1-3") read ranges.Console: Series number accepts a range, "#1-3" everywhere, and Series cards fill the slots a range covers.
Player side: KodeStar/audiosilo-frontend (feat/series-ranges). Docs: KodeStar/audiosilo-docs (docs/series-ranges).