Skip to content

fix(metadata): Detect keys — subtitle as artist fallback - #54

Merged
DABodr merged 1 commit into
mainfrom
fix/json-subtitle-artist
Nov 15, 2026
Merged

DABodr merged 1 commit into
mainfrom
fix/json-subtitle-artist

Conversation

@DABodr

@DABodr DABodr commented Nov 15, 2026

Copy link
Copy Markdown
Owner

'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-title next 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, title crooner.0.title, cover crooner.0.cover_big. Test added; 304/304 pass.

🤖 Generated with Claude Code

…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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T20:25:03.744283Z c808344 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DABodr
DABodr merged commit 1eaf69a into main Nov 15, 2026
1 check passed
@DABodr
DABodr deleted the fix/json-subtitle-artist branch November 15, 2026 20:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +69 to +70
} 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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