opds2: conform belongsTo.series.position + publisher/imprint to Readium spec#702
Merged
ajslater merged 3 commits intov1.11-performancefrom May 2, 2026
Merged
Conversation
…isher/imprint Closes #700. * belongsTo.series: emit `position` (was `number`, silently dropped by the serializer) so clients can read the issue number per series.schema.json. * publisher / imprint: render as Readium Contributor objects with browse links instead of bare strings, matching contributor.schema.json and the shape clients like Stump expect (mirrors readino.com OPDS2 output). * belongsTo.story_arc: fix the dict key (was `storyArc`, dropped by the serializer) so story arcs actually appear in manifests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Volume is a top-level Readium belongs_to property (https://readium.org/webpub-manifest/schema/volume.schema.json) and codex already routes Volume as group "v" — but OPDS2 manifests never exposed it. Add ``_publication_belongs_to_volume`` mirroring the series helper: ``position`` carries the integer volume number, ``Volume.to_str`` formats the human-readable name (e.g. "v1" or "(2024)"), and the browse link points at the volume's comic list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Surfaced while finishing #702. Linters that walk up for ignore files (prettier, remark, eslint) hit the main checkout's ``.claude`` ignore and treat the worktree as ignored — remark errors loudly, prettier silently processes zero files. Documents the structural cause and the recommended fix (move worktrees out of ``.claude/``). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Closes #700.
belongsTo.series.position— manifest was emitting the issue number under"number", which is not in the Readium series.schema.json; the serializer fieldpositionthen silently dropped it. Renamed the dict key toposition.publisher/imprint— wereCharFieldstrings; the spec (metadata.schema.json) types both as Contributor. Switched the serializer toOPDS2ContributorSerializerand added_publication_contributor()toOPDS2PublicationBaseView— emits{name, links: [browse-link]}pointing at the publisher (group=p) or imprint (group=i) feed. Both manifest and feed paths share the helper. Output now matches the readino.com OPDS2 feed cited in the issue.belongsTo.story_arc(drive-by) — manifest was writing key"storyArc", but the serializer readsstory_arc(camelCase rendering happens at the JSON renderer, not in the dict), so storyArc was being dropped from manifests entirely. Fixed.Test plan
make fix,make lint,make ty,make test-pythonall clean/opds/v2.0/c/<pk>/1on a populated install and confirmmetadata.belongsTo.series[0].position,metadata.publisher.{name,links},metadata.imprint.{name,links}, andmetadata.belongsTo.storyArcall render🤖 Generated with Claude Code