[PR #2789] [MERGED] Fix book limit for the Continue Series shelf (with skip earlier books toggle active) #3805

Closed
opened 2026-04-25 00:17:08 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2789
Author: @justcallmelarry
Created: 3/25/2024
Status: Merged
Merged: 3/25/2024
Merged by: @advplyr

Base: masterHead: bugfix/corretly-working-limit-for-continue-series-toggle


📝 Commits (1)

  • 2d68fa2 fix book limit for the contiue series shelf

📊 Changes

1 file changed (+8 additions, -3 deletions)

View changed files

📝 server/utils/queries/libraryItemsBookFilters.js (+8 -3)

📄 Description

Currently the Continue Series shelf (with skip earlier books toggle active) returns some weird results if you have more than 10 series which has a read book, but not all of them have a book that qualifies for the constrains of being of a higher sequence number than the ones already finished.

This is because the sql query returns the 10 series with most recent progress that fit for the untoggled library setting.

In order to solve the issues caused by this, I added the same sql query that calculates the maxSequence number to the original where-query, so that it will only return series that we know has books in them that are of a higher sequence than the ones already read.

The post-query code is still there, since the query still returns books that are below the maxSequence number.

Unfortunately the maxSequenceQuery is run twice against the db, but I did not figure out a better way of running the query in the current code base.

I am open to suggestions on improvements, though!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/2789 **Author:** [@justcallmelarry](https://github.com/justcallmelarry) **Created:** 3/25/2024 **Status:** ✅ Merged **Merged:** 3/25/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `bugfix/corretly-working-limit-for-continue-series-toggle` --- ### 📝 Commits (1) - [`2d68fa2`](https://github.com/advplyr/audiobookshelf/commit/2d68fa2c278d5c3b5642486c8d410935a2baf3af) fix book limit for the contiue series shelf ### 📊 Changes **1 file changed** (+8 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/queries/libraryItemsBookFilters.js` (+8 -3) </details> ### 📄 Description Currently the Continue Series shelf (with skip earlier books toggle active) returns some weird results if you have more than 10 series which has a read book, but not all of them have a book that qualifies for the constrains of being of a higher sequence number than the ones already finished. This is because the sql query returns the 10 series with most recent progress that fit for the untoggled library setting. In order to solve the issues caused by this, I added the same sql query that calculates the `maxSequence` number to the original where-query, so that it will only return series that we know has books in them that are of a higher sequence than the ones already read. The post-query code is still there, since the query still returns books that are below the `maxSequence` number. Unfortunately the `maxSequenceQuery` is run twice against the db, but I did not figure out a better way of running the query in the current code base. I am open to suggestions on improvements, though! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:17:08 +02:00
adam closed this issue 2026-04-25 00:17:08 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3805