Index: server/Slim/Formats/FLAC.pm =================================================================== --- server/Slim/Formats/FLAC.pm (revision 2272) +++ server/Slim/Formats/FLAC.pm (working copy) @@ -24,7 +24,6 @@ my %tagMapping = ( 'TRACKNUMBER' => 'TRACKNUM', - 'DATE' => 'YEAR', 'DISCNUMBER' => 'SET', 'URL' => 'URLTAG', ); @@ -130,6 +129,13 @@ delete $tags->{$old}; } } + + # Special handling for DATE tags + # Parse the date down to just the year, for compatibility with other formats + if (defined $tags->{'DATE'} && !defined $tags->{'YEAR'}) { + ($tags->{'YEAR'} = $tags->{'DATE'}) =~ s/.*(\d\d\d\d).*/$1/; + } + } sub addInfoTags { Index: server/Slim/Formats/Ogg.pm =================================================================== --- server/Slim/Formats/Ogg.pm (revision 2272) +++ server/Slim/Formats/Ogg.pm (working copy) @@ -36,7 +36,6 @@ my %tagMapping = ( 'TRACKNUMBER' => 'TRACKNUM', - 'DATE' => 'YEAR', ); # To turn perl's internal form into a utf-8 string. @@ -87,8 +86,15 @@ $tags->{$new} = $tags->{$old}; delete $tags->{$old}; } + } + # Special handling for DATE tags + # Parse the date down to just the year, for compatibility with other formats + if (defined $tags->{'DATE'} && !defined $tags->{'YEAR'}) { + ($tags->{'YEAR'} = $tags->{'DATE'}) =~ s/.*(\d\d\d\d).*/$1/; + } + # Add additional info $tags->{'SIZE'} = -s $file;