Functional changes for display_artist on 3NF schema#21
Conversation
|
The new setting is not sticking when I try to change it to enabled. Probably needs adding to the list of prefs in Slim/Web/Settings/Server/Behavior.pm You should also add a $prefs->setchange rule to trigger the rescan. |
|
I forgot to push schema_clear.sql to the branch. Done now. |
| $attributes->{$singular} = \@individuals; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
This is not working. example tags:
ALBUMARTIST: Bill Evans Trio with Scott LaFaro & Paul Motian
ALBUMARTISTS: Bill Evans; Bill Evans Trio; Scott LaFaro; Paul Motian
Results in only a single contributor being created "Bill Evans Trio with Scott LaFaro & Paul Motian" (I forced the new pref to "1").
There was a problem hiding this comment.
Probably because $attributes->{ALBUMARTISTS} is not an array?
There was a problem hiding this comment.
Good catch. The code assumed an arrayref but ALBUMARTISTS arrives as a scalar when written as a single semicolon-joined field (e.g. "Bill Evans; Scott LaFaro"). Fixed by routing through splitTag which handles both arrayrefs (pass-through) and scalars (splits on the configured splitList separator). Added a test fixture (fixture 23) that writes scalar plural tags to catch this going forward.
Signed-off-by: Rouzax <GitHub@mgdn.nl>
Signed-off-by: Rouzax <GitHub@mgdn.nl>
In updateOrCreateBase, capture albumDisplayArtist and trackDisplayArtist from the attributeHash before _preCheckAttributes strips/defers them. Pass both values to _postCheckAttributes, which now calls _getOrCreateDisplayContributor for each, writes display_contributor to the track row, and forwards both IDs to _createOrUpdateAlbum and _createContributorRoleRelationships. Without this, rescanning an existing track never updated display_contributor. Signed-off-by: Martijn Frazer <claude@mgdn.nl> Signed-off-by: Rouzax <GitHub@mgdn.nl>
Signed-off-by: Rouzax <GitHub@mgdn.nl>
Signed-off-by: Rouzax <GitHub@mgdn.nl>
Signed-off-by: Rouzax <GitHub@mgdn.nl>
Signed-off-by: Rouzax <GitHub@mgdn.nl>
Signed-off-by: Rouzax <GitHub@mgdn.nl>
Register usePluralArtistTags in Behavior.pm prefs list so the web UI can save it. Add to the setChange wipecache list so toggling the pref triggers a rescan. Handle scalar plural tags (e.g. semicolon-joined ALBUMARTISTS from TXXX) by routing through splitTag instead of requiring an arrayref. Signed-off-by: Rouzax <GitHub@mgdn.nl>
c2f0d66 to
00cc68c
Compare
Signed-off-by: Rouzax <GitHub@mgdn.nl>
|
Fixed in the latest push (00cc68c -> 81b63ba):
Rebased onto your schema_clear.sql commit as well. |
|
@Rouzax Thanks, I'm going to merge this, and the Material Skin PR and offer it to the forum for further testing. |
Summary
Ports the functional display_artist changes onto your 3NF contributor_display schema, as discussed in PR #20.
Schema is untouched. All changes work with your contributor_display table, integer FK columns, and junction tables as-is.
Supersedes #20 (flat-column approach).
Test plan