Skip to content

opds2: conform belongsTo.series.position + publisher/imprint to Readium spec#702

Merged
ajslater merged 3 commits intov1.11-performancefrom
claude/nervous-tereshkova-2ec2fd
May 2, 2026
Merged

opds2: conform belongsTo.series.position + publisher/imprint to Readium spec#702
ajslater merged 3 commits intov1.11-performancefrom
claude/nervous-tereshkova-2ec2fd

Conversation

@ajslater
Copy link
Copy Markdown
Owner

@ajslater ajslater commented May 2, 2026

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 field position then silently dropped it. Renamed the dict key to position.
  • publisher / imprint — were CharField strings; the spec (metadata.schema.json) types both as Contributor. Switched the serializer to OPDS2ContributorSerializer and added _publication_contributor() to OPDS2PublicationBaseView — 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 reads story_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-python all clean
  • Hit /opds/v2.0/c/<pk>/1 on a populated install and confirm metadata.belongsTo.series[0].position, metadata.publisher.{name,links}, metadata.imprint.{name,links}, and metadata.belongsTo.storyArc all render
  • Verify a real OPDS2 client (Stump / Chunky / Panels) follows the new publisher link

🤖 Generated with Claude Code

ajslater and others added 3 commits May 2, 2026 13:12
…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>
@ajslater ajslater merged commit d15f446 into v1.11-performance May 2, 2026
1 check failed
@ajslater ajslater deleted the claude/nervous-tereshkova-2ec2fd branch May 2, 2026 22:38
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