Guard ReplayGain and URL tag processing against arrayrefs#1571
Merged
michaelherger merged 1 commit intoMay 13, 2026
Merged
Conversation
Some ID3v2 TXXX-derived tags may arrive as arrayrefs if Audio::Scan returns multi-value frames. Add defensive guards using the established pattern from elsewhere in Schema.pm to take the first element when an arrayref is encountered. Covers: REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, REPLAYGAIN_ALBUM_PEAK, and URL. Signed-off-by: Rouzax <GitHub@mgdn.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$val = $val->[0] if ref $val eq 'ARRAY'pattern already present in Schema.pmContext
Companion to the Audio::Scan multi-value TXXX fix (LMS-Community/Audio-Scan#11). These guards are independently useful as defensive hygiene: they protect against arrayrefs arriving in these paths regardless of source.
Forum discussion: https://forums.lyrion.org/forum/user-forums/ripping-encoding-transcoding-tagging/1816764-lms-metadata-scaan-overrides-local-tags
Test plan