Commit 2cd9ea5
committed
#1555 - Use plural ALBUMARTISTS / ARTISTS as authoritative source of individual contributors
When Picard-style plural tags (ALBUMARTISTS, ARTISTS) are present as
arrayrefs on the scanned $attributes hash, use them as the
authoritative list of individual contributors rather than parsing the
joined singular ALBUMARTIST / ARTIST display string with splitList.
The singular tag remains the display string on the track / album row.
This is the structural follow-up to the stop-gap in 0dbbb98. With
aligned plural tags now feeding Slim::Schema::Contributor->add as
arrayrefs, the positional MBID zip is no longer a guess: it is an
index provided by the tagger. The length-mismatch guard from the
stop-gap stays as the safety net for the legacy single-string path.
- Slim/Schema.pm _preCheckAttributes: defer ARTISTS, ALBUMARTISTS,
TRACKARTISTS so they reach _mergeAndCreateContributors via the
newTrack path (previously they were left in the regular attributes
hash and lost before contributor processing).
- Slim/Schema.pm _mergeAndCreateContributors: prefer
\$attributes->{\$tag.'S'} as the contributor source when it is a
non-empty arrayref, for the ARTIST / ALBUMARTIST / TRACKARTIST
roles only. Other roles (COMPOSER, BAND, CONDUCTOR, ...) are
unchanged. Trim plural names, drop empty-name slots and their
aligned MBID slot, tolerate arrayref \$contributor in the
whitespace-strip step, and loosen the early skip so a track with
plural but no singular still produces rows.
- Slim/Schema.pm TRACKARTIST compilation transform (bug 2317 / 2638):
also migrate the plural ARTISTS tag to TRACKARTISTS, symmetric
with the existing ARTIST and MUSICBRAINZ_ARTIST_ID migration.
Picard tag mapping reference:
https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html
Backwards compatibility: files without plural tags, or with plural
tags as scalars, fall through to the existing splitList path. No
schema change. No format-parser change. Already-poisoned libraries
from pre-stop-gap scans need a wipecache. Users who tuned splitList
to work around the absence of plural-tag reading may find it is no
longer needed, but it is not removed.
Known limitation for MP3: Audio::Scan returns only the first value
of multi-value ID3v2.4 TXXX text frames (which is how Picard writes
plural tags into MP3 files). Until that is addressed, MP3 files see
the poisoning gone but do not get the full multi-contributor
benefit. FLAC, Ogg, Opus and MP4 are unaffected and gain the full
benefit.
Signed-off-by: Rouzax <GitHub@mgdn.nl>1 parent 6e40c98 commit 2cd9ea5
2 files changed
Lines changed: 78 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2842 | 2842 | | |
2843 | 2843 | | |
2844 | 2844 | | |
| 2845 | + | |
2845 | 2846 | | |
2846 | 2847 | | |
2847 | 2848 | | |
| |||
3126 | 3127 | | |
3127 | 3128 | | |
3128 | 3129 | | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
3129 | 3134 | | |
3130 | | - | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
3131 | 3138 | | |
3132 | 3139 | | |
3133 | 3140 | | |
3134 | 3141 | | |
3135 | 3142 | | |
3136 | 3143 | | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
3137 | 3151 | | |
3138 | 3152 | | |
3139 | | - | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
3140 | 3194 | | |
3141 | | - | |
3142 | | - | |
3143 | | - | |
| 3195 | + | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
3144 | 3202 | | |
3145 | 3203 | | |
3146 | 3204 | | |
3147 | 3205 | | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
3148 | 3214 | | |
3149 | 3215 | | |
3150 | | - | |
3151 | | - | |
| 3216 | + | |
| 3217 | + | |
3152 | 3218 | | |
3153 | 3219 | | |
3154 | 3220 | | |
3155 | 3221 | | |
3156 | | - | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
3157 | 3226 | | |
3158 | 3227 | | |
3159 | 3228 | | |
| |||
0 commit comments