Skip Menu |

This queue is for tickets about the mp3rename CPAN distribution.

Report information
The Basics
Id: 12127
Status: resolved
Priority: 0/
Queue: mp3rename

People
Owner: jv [...] cpan.org
Requestors: danno [...] umich.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.15



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
Will be implemented in the next version.