Repository navigation
fix(metadata): Detect keys — subtitle as artist fallback - #54
Conversation
…t key exists
{ title, subtitle } feeds (Crooner Radio: croonerradio.lu/datas/live/titles.json) put the artist
in subtitle. Low-priority fallback: a real artist key always wins. Test added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c808344465
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else if (kind === 'artist' && RE.subtitle.test(k)) { | ||
| s = 3; // fallback: { title, subtitle } feeds put the artist in subtitle (Crooner Radio); a real artist key wins |
There was a problem hiding this comment.
Keep subtitle fallback from outranking explicit artist fields
For feeds such as { title: 'T', subtitle: 'Album X', artist: { value: 'A' } }, detection now selects subtitle instead of the previously selected artist.value. Although the fallback's base score is lower, the same-object bonus in detectJsonKeys() makes it outrank the explicitly identified artist. The Detect keys UI then populates the artist mapping with the album subtitle. Apply fallback precedence when choosing the final pair, rather than relying on the base score alone, and cover nested explicit artist fields in the regression test.
Useful? React with 👍 / 👎.
'Detect keys' (JSON metadata) found no artist on { title, subtitle } feeds such as Crooner Radio (croonerradio.lu/datas/live/titles.json), where subtitle holds the artist.
subtitle/sub_title/subtitles/sub-titlenext to the title are now artist candidates with a low score: a real artist key (artist, performer…) always wins. Read-only detection, no change to the metadata loop.Checked on the live Crooner JSON: artist
crooner.0.subtitle, titlecrooner.0.title, covercrooner.0.cover_big. Test added; 304/304 pass.🤖 Generated with Claude Code