Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Slim/Schema.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,7 @@ sub _createOrUpdateAlbum {
# Bug 8034, this used to not change gain/peak values if they were already set,
# bug we do want to update album gain tags if they are changed.
if ( $attributes->{$gainTag} ) {
$attributes->{$gainTag} = $attributes->{$gainTag}[0] if ref $attributes->{$gainTag} eq 'ARRAY';
$attributes->{$gainTag} =~ s/\s*dB//gi;
$attributes->{$gainTag} =~ s/\s//g; # bug 15965
$attributes->{$gainTag} =~ s/,/\./g; # bug 6900, change comma to period
Expand Down Expand Up @@ -2802,6 +2803,7 @@ sub _preCheckAttributes {
# Bug: 2605 - Get URL out of the attributes - some programs, and
# services such as www.allofmp3.com add it.
if ($attributes->{'URL'}) {
$attributes->{'URL'} = $attributes->{'URL'}[0] if ref $attributes->{'URL'} eq 'ARRAY';

push @$rawcomments, delete $attributes->{'URL'};
}
Expand Down Expand Up @@ -2921,6 +2923,7 @@ sub processReplayGainTags {
$shortTag =~ s/^REPLAYGAIN_TRACK_(\w+)$/REPLAY_$1/;

if (defined $attributes->{$gainTag}) {
$attributes->{$gainTag} = $attributes->{$gainTag}[0] if ref $attributes->{$gainTag} eq 'ARRAY';

$attributes->{$shortTag} = delete $attributes->{$gainTag};
$attributes->{$shortTag} =~ s/\s*dB//gi;
Expand Down