Fix display_artist for semicolon-joined scalar tags#23
Conversation
|
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? tagging in @mikeysas for comment. |
|
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. 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>
a1a2a7d to
d63e9f4
Compare
|
The change with your idea was smaller then I thought so updated my PR. |
|
In the meantime I did my own version of the simplification: see #24 and tell me what you think. |
|
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. |
|
Thank you. #24 merged. |
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
_extractDisplayNamehelper, replacing the duplicated inline blocks in_newTrackandupdateOrCreateBase.