--- /usr/local/squeezeboxserver/Slim/Formats/MP3.pm.orig 2010-04-15 10:34:02.000000000 +0200 +++ /usr/local/squeezeboxserver/Slim/Formats/MP3.pm 2010-04-15 12:58:55.000000000 +0200 @@ -397,31 +397,24 @@ # Clean up comments if ( $tags->{COMMENT} && ref $tags->{COMMENT} eq 'ARRAY' ) { - my $fixed = []; - - if ( ref $tags->{COMMENT}->[0] eq 'ARRAY' ) { - for my $comment ( @{ $tags->{COMMENT} } ) { - if ( $comment->[2] ) { - # Comment has a description - push @{$fixed}, $comment->[2] . ': ' . $comment->[3]; - } - else { - push @{$fixed}, $comment->[3]; - } - } - } - else { - if ( $tags->{COMMENT}->[2] ) { - push @{$fixed}, $tags->{COMMENT}->[2] . ': ' . $tags->{COMMENT}->[3]; + my @fixed = (); + + for ( ref $tags->{COMMENT}->[0] eq 'ARRAY' ? @{ $tags->{COMMENT} } : $tags->{COMMENT} ) { + next unless defined; + my $fc = ''; + if ( $_->[2] ) { + $fc = $_->[2]; } - else { - push @{$fixed}, $tags->{COMMENT}->[3]; + if ( $_->[3] ) { + $fc .= ": " if $fc; + $fc .= $_->[3]; } + push @fixed, $fc if $fc; } - - $tags->{COMMENT} = $fixed; + + $tags->{COMMENT} = \@fixed; } - + # Clean up lyrics if ( $tags->{LYRICS} && ref $tags->{LYRICS} eq 'ARRAY' ) { $tags->{LYRICS} = $tags->{LYRICS}->[3]; --- /usr/local/squeezeboxserver/Slim/Formats.pm.orig 2010-04-15 10:28:10.000000000 +0200 +++ /usr/local/squeezeboxserver/Slim/Formats.pm 2010-04-15 12:16:39.000000000 +0200 @@ -253,20 +253,12 @@ use bytes; - if (ref($tags->{$tag}) eq 'ARRAY') { - - for (my $i = 0; $i < scalar @{$tags->{$tag}}; $i++) { - - $tags->{$tag}->[$i] =~ s/$Slim::Utils::Unicode::bomRE//; - $tags->{$tag}->[$i] =~ s/\000$//; - } - - } else { - - $tags->{$tag} =~ s/$Slim::Utils::Unicode::bomRE//; - $tags->{$tag} =~ s/\000$//; + for ( ref($tags->{$tag}) eq 'ARRAY' ? @{$tags->{$tag}} : $tags->{$tag} ) { + next unless defined; + s{$Slim::Utils::Unicode::bomRE}{}; + s{\000$}{}; } - + # Bug 14587, sanity check all MusicBrainz ID tags to ensure it is a UUID and nothing more if ( $tag =~ /^MUSICBRAINZ.*ID$/ ) {