X-Git-Url: https://diplodocus.org/git/flac-archive/blobdiff_plain/07ddcb6b5bfbb274f28a6640b40779378701a34f..d9db8984a67a969021899cd303680bfdbe5014c1:/fa-flacd diff --git a/fa-flacd b/fa-flacd index 344f477..e2a2b21 100755 --- a/fa-flacd +++ b/fa-flacd @@ -70,6 +70,7 @@ sub flac { my $artist; my $album; my @tags; + my $outfile; my $status; verbose("Renaming $dir/tags\n"); @@ -84,8 +85,16 @@ sub flac { verbose("chdir($dir)\n"); chdir($dir) or die("chdir($dir): $!"); + $outfile = "$album.flac-tmp"; + for ($outfile) { + s/\//_/g; + s/:/_/g; + s/'/_/g; + s/"/_/g; + } + verbose("Running flac\n"); - $status = system('flac', '-o', "../$artist/$album.flac-tmp", + $status = system('flac', '-o', "../$artist/$outfile", '--delete-input-file', '-V', '--cuesheet', 'cue', '--no-padding', '--best', map({ ('-T', $_) } @tags), @@ -117,7 +126,7 @@ sub flac { sub reaper { my $pid; - while (($pid = waitpid(0, WNOHANG)) > 0) { + while (($pid = waitpid(-1, WNOHANG)) > 0) { push(@finished, [$pid, $?]); } @@ -271,11 +280,6 @@ B requires the number of tracks as its sole argument. =over 4 -=item CDDBURL - -B uses this to retrieve candidate Vorbis tags. Defaults to -"http://freedb.freedb.org/~cddb/cddb.cgi". - =item CDDEV B uses this to rip audio and save the cuesheet for a CD. It