diff --git a/Changes b/Changes index c286d46..9622bcf 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for MP3-Tag-Utils +0.0.2 2010-08-23/17:40 + -Correct handling of 2.4 tracks. + -Replace '/' in tags with '\' when renaming. + 0.0.1 2010-08-19/18:00 -Add a missing && in "bin/mp3tag". diff --git a/lib/MP3/Tag/Utils.pm b/lib/MP3/Tag/Utils.pm index 268d1e1..3f5289b 100644 --- a/lib/MP3/Tag/Utils.pm +++ b/lib/MP3/Tag/Utils.pm @@ -11,11 +11,11 @@ MP3::Tag::Utils - Assorted utilities for manipulating MP3 files via MP3::Tag. =head1 VERSION -Version 0.0.1 +Version 0.0.2 =cut -our $VERSION = '0.0.1'; +our $VERSION = '0.0.2'; =head1 SYNOPSIS @@ -175,7 +175,8 @@ sub change{ =head2 rename -This renames files. +This renames files. s/\//\\/g is used on all the tags to make sure +there are no directory issues. One argument is taken and it is a hash ref. @@ -300,6 +301,13 @@ sub rename{ $int2++; } + $track=~s/\/.*//; + $title=~s/\//\\/g; + $album=~s/\//\\/g; + $artist=~s/\//\\/g; + $genre=~s/\//\\/g; + $year=~s/\//\\/g; + my %data=( title=>$title, track=>$track, @@ -462,6 +470,8 @@ sub show{ $int2++; } + $track=~s/\/.*//; + my %data=( file=>$args{files}[$int], title=>$title,