🐛 Fix incomplete OPDS 2.0 catalog pagination - #1444
Open
eduardojvieira wants to merge 1 commit into
Open
eduardojvieira wants to merge 1 commit into
eduardojvieira wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
aaronleopold
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for working on this fix, there are a few items that should be addressed before merge but otherwise things look good to me
| )) | ||
| .rel(OPDSLinkRel::Previous.item()) | ||
| .build() | ||
| .expect("valid OPDS previous link"), |
Collaborator
There was a problem hiding this comment.
The error is able to bubble up and return a response, we should not panic here. You can see other instances where this is done, e.g. build()?
| )) | ||
| .rel(OPDSLinkRel::Next.item()) | ||
| .build() | ||
| .expect("valid OPDS next link"), |
| )) | ||
| .rel(OPDSLinkRel::Next.item()) | ||
| .build() | ||
| .expect("static OPDS link is valid"), |
Collaborator
There was a problem hiding this comment.
Another panic here we can remove
| .href(pagination_href(&base_url, &pagination, page)) | ||
| .rel(OPDSLinkRel::Previous.item()) | ||
| .build() | ||
| .expect("valid OPDS previous link"), |
| )) | ||
| .rel(OPDSLinkRel::Next.item()) | ||
| .build() | ||
| .expect("valid OPDS next link"), |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1443
Description
Fix OPDS 2.0 feeds that stopped KOReader from reaching complete library, series, and book lists:
/librariesa real self URL and page-specific next/previous links; report the requested page in metadata./libraries/{id}/seriesfeed and anAll Seriesnavigation entry in each library. KOReader 2026.07.2 ignores group links when a group also has navigation, so the top-level entry makes the complete series list reachable while retaining previews.OPDS 1.2 is intentionally unchanged: its libraries feed returned the full list in the reproduction, and I could not establish a matching 1.2 truncation bug.
LLM disclosure: I used Codex to help inspect KOReader/Stump, implement the patch, and generate tests. I reviewed the diff and ran the checks below myself.
Verification
cargo fmt --check— passedcargo test -p stump_server --test api_tests— 77 passed, 0 failedcargo clippy -p stump_server --test api_tests— passed with three warnings in unrelated existing files (apps/server/src/middleware/auth.rsandapps/server/tests/reading_progress/manual_progression_changes.rs)git diff --check— passedThe JSON/navigation contract is covered by new integration tests, including access denial for an excluded library. I could not test on a physical Kobo; this PR is not deployed to the reported server.
Ready?
nightlyand notmainStump Contributor License Agreement
By contributing to Stump, I agree that my contributions will be licensed under the applicable licenses described in the contribution template.