Skip to content

Update onlyShowLaterBooksInContinueSeries to account for rereads#5120

Open
octopotato wants to merge 1 commit intoadvplyr:masterfrom
octopotato:fix/continue-series-reread
Open

Update onlyShowLaterBooksInContinueSeries to account for rereads#5120
octopotato wants to merge 1 commit intoadvplyr:masterfrom
octopotato:fix/continue-series-reread

Conversation

@octopotato
Copy link
Copy Markdown

@octopotato octopotato commented Mar 12, 2026

Brief summary

I updated the onlyShowLaterBooksInContinueSeries query to use the most recently finished book's position instead of the highest finished sequence. This makes rereads actually move your continue-series position.

Which issue is fixed?

I was going to open an issue but found #2687, where this was originally introduced, where it was called out that "this would not really help re-listeners." Figured I'd take a crack at that. Happy to open a separate/new issue for it.

In-depth Description

The max(sequence) approach only ever goes forward, so rereading an earlier book has no effect on where continue-series picks up. If you finished books 1-5 and reread book 1, it still shows book 6.

I switched the subquery to order by finishedAt (with COALESCE to updatedAt for older records that might not have it) and grab the first result. So re-finishing book 1 gives you sequence 1, next book shown is 2.

For batch mark-as-finished where everything gets the same finishedAt, I added a sequence tiebreaker so it falls back to the highest sequence, basically the same as the old behavior.

I also had to widen the bookSeries include to not filter out finished books when the setting is on, since after a reread the "next" book might be one you've already read.

Default behavior (setting off) is untouched.

Not 100% sure if this should live behind a separate setting or if changing the existing one is fine. Happy to split it out if that's preferred.

How have you tested this?

Ran the server locally with the setting enabled and confirmed the reread scenario shows the right book. Also added integration tests.

Screenshots

Screen.Recording.2026-03-12.at.5.53.34.PM.mov

…aterBooks is enabled

The setting used max(sequence) to find where the user is in a series, so
re-reading an earlier book had no effect on the continue-series position.
Switched to ordering by finishedAt instead, with highest sequence as
tiebreaker for batch mark-as-finished.
@octopotato octopotato force-pushed the fix/continue-series-reread branch from 39cbc75 to 953dddb Compare March 12, 2026 04:38
@octopotato octopotato marked this pull request as ready for review March 12, 2026 21:35
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