Skip to content

Fix Novelight current-chapter number shown on the library card#74

Merged
Aatricks merged 1 commit into
mainfrom
fix/novelight-current-chapter-label
Jul 6, 2026
Merged

Fix Novelight current-chapter number shown on the library card#74
Aatricks merged 1 commit into
mainfrom
fix/novelight-current-chapter-label

Conversation

@Aatricks

@Aatricks Aatricks commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Follow-up to #73. The library card and the continue-reading progress show the stored currentChapter value. For Novelight that value was written from the /book/chapter/{id} reading URL, where the id is not the chapter number, so the card showed the id (for example 141313) instead of the real chapter number. WEB reading never rewrites currentChapter, so it stayed wrong.

When the reader loads the authoritative chapter list, it now rewrites the current chapter's stored number to the real one from the list, keeping whatever prefix the label already used ("Chapter 141313" becomes "Chapter 102", "141313" becomes "102"). It only touches entries whose number is actually wrong, so the other sources are unaffected, and it heals in place as you open each chapter.

Added unit tests for the heal helper. The usual check passes (unit tests, detekt, both build flavors). Verified on device.

The library card renders the stored currentChapter, which for Novelight was
written from the /book/chapter/{id} URL and so showed the internal id (e.g.
141313) instead of the chapter number. WEB reading never rewrites it. When the
reader loads the authoritative chapter list, rewrite the stored label's number
to the real one for the current chapter, keeping whatever prefix it uses.
@Aatricks Aatricks merged commit 5f466b1 into main Jul 6, 2026
4 checks passed
@Aatricks Aatricks deleted the fix/novelight-current-chapter-label branch July 6, 2026 16:02
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.

1 participant