Skip to content

Series ranges: an omnibus of books 1-3 is numbered 1-3 - #133

Merged
KodeStar merged 4 commits into
mainfrom
feat/series-ranges
Oct 14, 2026
Merged

KodeStar merged 4 commits into
mainfrom
feat/series-ranges

Conversation

@KodeStar

Copy link
Copy Markdown
Owner

Fixes #130.

A series position may now be a range (an omnibus of books 1-3). Typing 1-3 in 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 /fs book entry keep series_index as the range's start (shipped players read the omnibus as book 1) and add series_index_end; series_list entries add position_end. /series positions list every slot a range covers. Export writes series_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 and more_series ("Omnibus #1-3") carry the range; a series-part tag "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/match gets "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).

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
KodeStar merged commit c2a4051 into main Oct 14, 2026
3 checks passed
@KodeStar
KodeStar deleted the feat/series-ranges branch October 14, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Series number can't hold a range (omnibus of books 1-3)

1 participant