Permalink
Browse files

add support for mp2 extension and change mp3 filetype

  • Loading branch information...
squentin committed Oct 17, 2015
1 parent 307e93e commit 85ec2784365edfcf435a494119e6a4ba3791eb64
Showing with 8 additions and 5 deletions.
  1. +7 −4 gmusicbrowser.pl
  2. +1 −1 gmusicbrowser_tags.pm
View
@@ -81,8 +81,8 @@ BEGIN
{
TRUE => 1,
FALSE => 0,
VERSION => '1.101501',
VERSIONSTRING => '1.1.15.1',
VERSION => '1.101502',
VERSIONSTRING => '1.1.15.2',
PIXPATH => $DATADIR.SLASH.'pix'.SLASH,
PROGRAM_NAME => 'gmusicbrowser',
@@ -232,8 +232,8 @@ sub barename #filename without extension
}
our %Alias_ext; #define alternate file extensions (ie: .ogg files treated as .oga files)
INIT {%Alias_ext=(ogg=> 'oga', m4b=>'m4a');} #needs to be in a INIT block because used in a INIT block in gmusicbrowser_tags.pm
our @ScanExt= qw/mp3 ogg oga flac mpc ape wv m4a m4b/;
INIT {%Alias_ext=(mp2=>'mp3', ogg=> 'oga', m4b=>'m4a');} #needs to be in a INIT block because used in a INIT block in gmusicbrowser_tags.pm
our @ScanExt= qw/mp3 mp2 ogg oga flac mpc ape wv m4a m4b/;
our ($Verbose,$debug);
our %CmdLine;
@@ -2428,6 +2428,9 @@ sub ReadSavedTags #load tags _and_ settings
{ for my $floatvector ($Songs::Songs_replaygain_track_gain__,$Songs::Songs_replaygain_track_peak__,$Songs::Songs_replaygain_album_gain__,$Songs::Songs_replaygain_album_peak__)
{ $floatvector= pack "F*",map {$_!="inf" ? $_ : "nan"} unpack("F*",$floatvector) if $floatvector; }
}
if ($oldversion<1.101502)
{ IdleDo('0_Updatemp3filetype', 10,sub { my $h=Songs::BuildHash('filetype',undef,'','id:list'); while (my ($gid,$IDs)=each %$h) { my $type= Songs::Gid_to_Get('filetype',$gid); $type=~s/2,5/2.5/; $type=~s/^mp3 l(\d)v(\d.*)/mp$1 mpeg-$2 l$1/ && Songs::Set($IDs,filetype=>$type); } });
}
delete $Options{LastPlayFilter} unless $Options{RememberPlayFilter};
$QueueAction= $Options{QueueAction} || '';
View
@@ -25,7 +25,7 @@ our %FORMATS;
INIT
{
%FORMATS= # module format string tags to look for (order is important)
( mp3 => ['Tag::MP3', 'mp3 l{layer}v{versionid}', 'ID3v2 APE lyrics3v2 ID3v1',],
( mp3 => ['Tag::MP3', 'mp{layer} mpeg-{versionid} l{layer}', 'ID3v2 APE lyrics3v2 ID3v1',],
oga => ['Tag::OGG', 'vorbis v{version}', 'vorbis',],
flac => ['Tag::Flac', 'flac', 'vorbis',],
mpc => ['Tag::MPC', 'mpc v{version}', 'APE ID3v2 lyrics3v2 ID3v1',],

0 comments on commit 85ec278

Please sign in to comment.