Skip to content

Fix display_artist for semicolon-joined scalar tags#23

Closed
Rouzax wants to merge 1 commit into
darrell-k:display_artistfrom
Rouzax:pr/1576-semicolon-fix
Closed

Fix display_artist for semicolon-joined scalar tags#23
Rouzax wants to merge 1 commit into
darrell-k:display_artistfrom
Rouzax:pr/1576-semicolon-fix

Conversation

@Rouzax
Copy link
Copy Markdown

@Rouzax Rouzax commented May 22, 2026

Only populate display_artist when both the singular and plural tags exist. When the plural is absent, return undef so display falls back to 9.1 contributor behavior. The singular is taken as-is (no splitting), preserving the original artist credit string.

Extracts a shared _extractDisplayName helper, replacing the duplicated inline blocks in _newTrack and updateOrCreateBase.

@darrell-k
Copy link
Copy Markdown
Owner

I'm not sure about this. As I understand the singular tag (when the plural is also present) is designed to hold the actual album (or track) artist credit, which could contain any character, including that which the user has selected as a split character. So I think we should take the full string, unadulterated.

In the case where there are multiple singular tags we should just take the first one (do we ever see multiple singular tags apart from in test cases)?

Taking a step backwards, as I asked on the forum (where it probably got lost in the flurry), what do we lose with this very simple logic?

IF the preference is switched on and we have both the plural tag and the singular tag
    use the plural tag exactly as we do currently the singular tag
    use the singular tag with no splitting to populate display_artist and create the relationships (if multiple tags only use the first one)
ELSE
    do exactly as we do at present

tagging in @mikeysas for comment.

@Rouzax
Copy link
Copy Markdown
Author

Rouzax commented May 22, 2026

Yeah this PR was indeed with the idea of only taking the first one, I agree that is also not desirable. Will have a think about your proposed solution.
It is a tricky situation all over with the history and legacy implementation of the split character

I won't be able to look at this in the coming days probably.

@darrell-k
Copy link
Copy Markdown
Owner

Yeah this PR was indeed with the idea of only taking the first one, I agree that is also not desirable. Will have a think about your proposed solution. It is a tricky situation all over with the history and legacy implementation of the split character

I won't be able to look at this in the coming days probably.

In that case I will implement my proposal above and throw it back to @mikeysas for testing.

When a singular artist tag has no corresponding plural tag, return
undef so the display falls back to 9.1 contributor behavior. When
both exist, take the singular as-is (first element for arrays, full
string for scalars) as the display name.

Replaces the duplicated inline display extraction blocks in _newTrack
and updateOrCreateBase with a shared helper.

Signed-off-by: Rouzax <GitHub@mgdn.nl>
@Rouzax Rouzax force-pushed the pr/1576-semicolon-fix branch from a1a2a7d to d63e9f4 Compare May 22, 2026 17:17
@Rouzax
Copy link
Copy Markdown
Author

Rouzax commented May 22, 2026

The change with your idea was smaller then I thought so updated my PR.
Updated to match your proposal. The helper now returns undef unless both singular and plural are present. No splitting of the singular. Squashed to a single commit.

@darrell-k
Copy link
Copy Markdown
Owner

In the meantime I did my own version of the simplification: see #24 and tell me what you think.

@Rouzax
Copy link
Copy Markdown
Author

Rouzax commented May 22, 2026

Closing in favor of #24 which supersedes this. Your approach is cleaner: moving the swap earlier and deleting the old block in _mergeAndCreateContributors simplifies the whole flow. The case-insensitive display lookup and pref gating are improvements I missed.

@Rouzax Rouzax closed this May 22, 2026
@darrell-k
Copy link
Copy Markdown
Owner

Thank you. #24 merged.

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.

2 participants