Skip to content

feat(genres): add canonical genre storage, assignment, and catalog feeds - #153

Draft
phildenhoff wants to merge 1 commit into
opds-8-searchfrom
opds-9-genres
Draft

phildenhoff wants to merge 1 commit into
opds-8-searchfrom
opds-9-genres

Conversation

@phildenhoff

@phildenhoff phildenhoff commented Sep 18, 2026

Copy link
Copy Markdown
Member

Why

Calibre tags are freeform, which makes them a noisy, unstable basis for a genre facet. Citadel wants a small canonical genre list — distinct from tags, and distinct from whatever a metadata provider happens to file under "subject" — that books can be assigned and readers can browse (ADR 0003).

What changed

  • libcalibre stores genres in a citadel_genres custom column, created on demand; set_book_genres/add_book_genres normalize names, list_genres returns genres with book counts, and book queries can filter by a resolved genre.
  • Metadata providers carry genre candidates separately from subjects. Only two inputs are authoritative in v1: Hardcover search genres (hardcover:genre) and MARC 655 genre/form terms (marc:655). Open Library subjects and other MARC 6XX fields stay suggestions and are never silently promoted to genres.
  • EditBook shows stored genres and provider genre suggestions alongside subjects, with add / add-all assignment.
  • The OPDS Genres facet and genre-filtered acquisition feeds now serve real data instead of the empty stub from the navigation layer.

One behavioral note worth knowing: the facet stays empty until someone assigns a genre, because that first assignment is what creates the column.

Validation: the stack tip runs 62 citadel-opds tests + 348 workspace tests, all green.

Stack: #146#147#148#149#150#151#152#153 (this) → #154#155

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 83.86%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 83.86%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 83.86%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 84.01%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 84.01%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 84.01%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 84.01%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 84.01%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 84.01%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

feat(opds): serve canonical genre feeds
@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 84.01%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

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