diff --git a/tagfromfilename b/tagfromfilename index a623f1f..99bf725 100755 --- a/tagfromfilename +++ b/tagfromfilename @@ -60,9 +60,11 @@ foreach (@ARGV) # Remove old flac comments that match if ($isflac) { + system("metaflac --remove-tag=TRACKNUMBER $_"); system("metaflac --remove-tag=tracknumber $_"); if (!$tracknumonly) { + system("metaflac --remove-tag=TITLE --remove-tag=ARTIST --remove-tag=ALBUM $_"); system("metaflac --remove-tag=title --remove-tag=artist --remove-tag=album $_"); } } @@ -71,8 +73,8 @@ foreach (@ARGV) { foreach (`vorbiscomment -l $_`) { - if ($tracknumonly) { print COMMENTFILE $_ unless (/^tracknumber/); } - else { print COMMENTFILE $_ unless (/^(title)|(artist)|(tracknumber)|(album)/); } + if ($tracknumonly) { print COMMENTFILE $_ unless (/^tracknumber/i); } + else { print COMMENTFILE $_ unless (/^(title)|(artist)|(tracknumber)|(album)/i); } } }