feat(v3 library): genre field in the Fix-metadata popup#780
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR makes genre queries use override-aware effective values on the server, shows candidate genre in the match-review Details view, keeps genre out of file writes, and adds API tests for facet/filter behavior. ChangesGenre override support
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant API as /api/library/genres
participant MetadataDB
participant DB as SQLite
Client->>API: GET /api/library/genres
API->>MetadataDB: resolve effective genre expression
MetadataDB->>DB: query distinct effective genres
DB-->>MetadataDB: genre values
MetadataDB-->>API: facet list
API-->>Client: genres list
Related issues: None found. Related PRs: None found. Suggested labels: backend, frontend, tests Suggested reviewers: None specified. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
📋 Merge order — metadata-curation epic (7 PRs)
#778–#780 are stacked (each based on the branch above), so GitHub re-points each to
|
057e86a to
6a044e1
Compare
Adds Genre as a fifth Details field (edit / lock / revert / Yours-Pack provenance), backed by the existing override store. To make it actually useful, the genre FILTER and FACET now resolve the per-song override (effective genre = override else scanned pack genre) — guarded so the common no-override case stays on the plain indexed column — so a corrected/added genre is immediately browsable. Genre stays a library-only overlay: it is NOT a write-to-file field (split WRITE_FIELDS = the four file-safe fields from the five DETAIL_FIELDS), so Write to file leaves the genre override in place and the copy says so. The Match→Details bridge also carries a candidate's first genre. Tests: effective-genre facet + filter, and that a value-less lock doesn't invent an effective genre. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bee4f12 to
007c435
Compare
Adds Genre as a fifth field in the popup's Details tab (stacked on #779 → #778 → #777).
What
genre)./api/library/genres+ thegenre=filter) now resolve the per-song override — effective genre = your override else the scanned pack genre — so a corrected or added genre is immediately browsable. Guarded on_has_genre_overrides()so the common no-override case stays on the plain indexed column (zero cost).WRITE_FIELDS(the four file-safe fields) is split from the fiveDETAIL_FIELDS, so Write to file writes title/artist/album/year and leaves the genre override in place; the copy says "genre stays a library-only tag."Why genre isn't written to the pack
POST /api/song/{fn}/meta(the write path) handles the four catalog fields; the feedpakgenreslist is a separate shape and genre works best as a fast, reversible library-side facet (fix it, browse by it, never touch the file). Locking still protects it from auto-match.Testing
test_field_overrides+test_library_filtersgreen (57).Stacks on #779 → #778 → #777. Merge bottom-up.
🤖 Generated with Claude Code
Summary by CodeRabbit