Skip to content

Derive series labels from series links instead of stale snapshots - #48

Open
tillkruss wants to merge 1 commit into
Chaptarr:developfrom
tillkruss:fix/series-title-from-links
Open

Derive series labels from series links instead of stale snapshots#48
tillkruss wants to merge 1 commit into
Chaptarr:developfrom
tillkruss:fix/series-title-from-links

Conversation

@tillkruss

Copy link
Copy Markdown
Contributor

Description

Fixes #34.

Series labels come from Book.SeriesName/SeriesPosition, stamped once at add time and never re-derived — so books show a series in the wrong language, a number borrowed from another series (The Way of KingsThe Cosmere Universe #1, where the 1 is Stormlight's), or a series on a book that isn't in one. Building Ruddarr for iOS made it worse: a book turns up under several alias series from different sources, and the label can't be matched back to one — gr:135117 is The Cosmere Universe in the scalar and The Cosmere in the links.

SeriesBookLink is reconciled on every refresh, so it becomes authoritative. BookSeriesLabel picks one link and formats Title #Position from it, so both halves always come from the same series; the API, FileNameBuilder and a refresh-time repair all use it. Also exposes seriesType/parentSeriesId so clients get the hierarchy instead of inferring it.

Database Migration

NO. No schema change, but a refresh rewrites existing Books.SeriesName/SeriesPosition from the links — that's what repairs already-added books. Books without links are untouched.

How was this tested?

New fixtures in Chaptarr.Core.Test/Books: BookSeriesLabelFixture, BookResourceSeriesTitleFixture, BookServiceResyncDenormalizedSeriesFieldsFixture.

@tillkruss
tillkruss marked this pull request as draft August 16, 2026 04:14
@tillkruss
tillkruss force-pushed the fix/series-title-from-links branch from a906b2c to 467687e Compare August 16, 2026 04:15
@tillkruss
tillkruss force-pushed the fix/series-title-from-links branch from 467687e to 868f3d3 Compare August 16, 2026 04:19
@tillkruss
tillkruss marked this pull request as ready for review August 16, 2026 04:19
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 name/position come from stale denormalized fields (wrong language, wrong numbers, mismatched pairs)

1 participant