Subject: | Better track recognition |
if you're still maintaining mp3rename, you might make the following
change:
#$track = $1 if !$track && $file =~ /(?:^|\/|_)(\d{1,2})\.?_[^\/]*$/;
$track = $1 if !$track && $file =~ /(?:^|\/|_ )(\d{1,2})\.?[_ ][^\/]*$/;
Around line 93 (i've added a few lines so i'm not sure exactly).
In case this gets munged, the change is to add a space to the list of
items to be matched before or after the track number.
The script didn't properly extract the track numbers from the file
names in this directory:
Buddha and the chocolate box@wrx% ls
01 - music.mp3 04 - ghost town.mp3 07 - king of trees.mp3
02 - oh very young.mp3 05 - jesus.mp3 08 - a bad penny.mp3
But does with this patch.
my head starts to spin when i spend too much time with regexp syntax
so there might be other unintended consequences but this works for me,
anyway.
You might also want to add a command line option to limit things to
lowercase file names only - that was the first thing I changed and i
bet others might like it too.
regardless, thanks much for making this available.
danno
--
dan pritts
danno@umich.edu
734 929 9770