There is a way to skip previously replaygained flac files, i used the
following perl. It will redo replaygain for a directory as album only
if any track is missing replaygain tag.
$DIR=$ARGV[0];
sub gettag
{
$FILE=$_[0];
$TAG=$_[1];
$VAL=`metaflac --show-tag=$TAG \"$FILE\"`;
chomp $VAL;
$VAL =~ s/.*=//;
return $VAL;
}
@FLAC=<*.flac>;
$num_flac = @FLAC;
foreach $file (@FLAC) {
$rg = gettag($file,"REPLAYGAIN_TRACK_GAIN");
if ( !$rg ) {
last;
}
}
if ( $num_flac ) {
if( !$rg ) {
print "adding replay gain to $DIR...\n";
system("metaflac --add-replay-gain *.flac");
}
}
--
myrrh
------------------------------------------------------------------------
myrrh's Profile: http://forums.slimdevices.com/member.php?userid=11023
View this thread: http://forums.slimdevices.com/showthread.php?t=36116
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix