Repository navigation
Description
SeerrNG Books discovery and library loading
Environment
- SeerrNG
3.72.40(ghcr.io/snapetech-org/seerrng:latest) - ChaptarrNG is configured as the ebook and audiobook service.
- The Books page showed: “Book discovery is unavailable right now. Open Library could not be reached. Try again.”
- The desired behavior is to display books already in the ChaptarrNG library.
Steps to reproduce
- Configure SeerrNG with a ChaptarrNG-compatible book service containing an ebook library.
- Sign in to SeerrNG and open Discover → Books.
- Select Available and the Ebooks format.
- Leave the page at or near the bottom of the results list, or use a viewport/scroll position that keeps the list close to the bottom.
- Observe that
/api/v1/discover/books?page=N&...continues requesting successive pages without a deliberate “load more” action. In the affected installation, requests advanced rapidly into the dozens of pages. - After enough requests, observe intermittent HTTP 429 responses and the generic “Open Library could not be reached” banner. Cover requests may also return HTTP 429.
To reproduce the query-parameter bug after routing Available to the library endpoint, send a discovery-only parameter such as sortBy to /api/v1/book/library?format=ebook&sortBy=ranked. The endpoint rejects it with Unknown query parameter 'sortBy'.
Findings
-
The Books page’s Available view was still requesting
/api/v1/discover/books, which returns discovery results. The browser did not initially call the separate in-library endpoint,/api/v1/book/library. -
Books discovery automatically fetched many pages. The client bundle checked whether the page was near the bottom on a 500 ms interval, as well as on scroll and resize. Open Library reported roughly 43.8 million results (
totalPagesaround 876,480 at 50 results per page), so this could keep fetching pages indefinitely. Traefik logs showed rapid requests through pages 37–134, followed by further page requests. -
Requests intermittently returned HTTP 429. SeerrNG’s logs also explicitly recorded HTTP 429 “Too Many Requests” from
covers.openlibrary.org. A direct search request toopenlibrary.orgreturned HTTP 200 when checked after the burst. This points to temporary rate limiting from excessive requests, rather than a persistent network or Docker connectivity failure. -
The UI’s generic Open Library error obscured the rate-limit failure. The in-library route also rejects discovery-only query parameters: after the Available view was switched to
/api/v1/book/library, passingsortBycausedUnknown query parameter 'sortBy', which was again presented with the misleading Open Library message. -
ChaptarrNG was reachable. Its API reported 7,813 ebook records, including 912 with ebook files. SeerrNG’s database contained many ebook records marked available. The underlying library data was present.
Workaround applied to this installation
- The persistent SeerrNG startup script routes the Books Available view to
/api/v1/book/libraryand sends only the supportedformatparameter. - Automatic pagination on the Books discovery page is disabled to prevent another request burst.
- A separate My Bookshelf page was added with explicit Load more paging.
- The service-worker cache version was bumped so the browser can receive the updated bundle. SeerrNG was restarted.
These are runtime patches to the deployed container, not changes to the upstream source repository.
Suggested upstream fixes
- Make the Available filter use the in-library endpoint, with only its supported parameters.
- Replace 500 ms automatic bottom polling with user-driven or bounded pagination.
- Handle HTTP 429 distinctly, respect any
Retry-Afterheader, and avoid translating rate limits into “Open Library could not be reached.” - Back off and coalesce cover requests when Open Library Covers returns 429, rather than continuing to retry at high volume.
Activity
github-actions commentedon Nov 22, 2026
Possible duplicate detected
This issue may be a duplicate of the following (detected via semantic similarity + LLM review):
A maintainer will review this. If this is not a duplicate, no action is needed.