Fixed -0 option in tagfromfilename
This commit is contained in:
@ -28,7 +28,7 @@
|
||||
# 0.1: initial implementation
|
||||
|
||||
$VERSION = "0.2.4";
|
||||
$HELP_MSG = "Vorbiscomment from Filename $VERSION\n\tusage: vcfromfilename [options] <files>\n\nValid options:\n\t-n\tOnly set the track numbers\n\t-0\tPreserve leading 0s in track numbers\n\t-T: Write tag names (not tag content) in all caps";
|
||||
$HELP_MSG = "Vorbiscomment from Filename $VERSION\n\tusage: vcfromfilename [options] <files>\n\nValid options:\n\t-n\tOnly set the track numbers\n\t-0\tPreserve leading 0s in track numbers\n\t-T: Write tag names (not tag content) in all caps\n";
|
||||
|
||||
chomp($COMMENTFILENAME = '/tmp/vcfromfilename-' . `whoami`);
|
||||
|
||||
@ -100,7 +100,7 @@ foreach (@ARGV)
|
||||
# Now get the track number
|
||||
my $tracknum = $_;
|
||||
$tracknum =~ s/.*-(\d{2})-.*/\1/;
|
||||
if (!$extrazeros) { $tracknum =~ s/\b0*//; } # removing leading zeros
|
||||
if (!$extrazero) { $tracknum =~ s/\b0*//; } # removing leading zeros
|
||||
$tracknum = formatName($tracknum, 'tracknumber=', $captagnames);
|
||||
print COMMENTFILE $tracknum;
|
||||
|
||||
|
Reference in New Issue
Block a user