]> diplodocus.org Git - flac-archive/blobdiff - fa-flacd
Support a -t track-count option to fa-rip and mkcue, so we can skip
[flac-archive] / fa-flacd
index 37e79a0a49a5ea3b01abad9c5931862786e97902..5f3ab7f07c5d6c3724f102558f1920d2354d5cce 100755 (executable)
--- a/fa-flacd
+++ b/fa-flacd
@@ -10,7 +10,7 @@ B<fa-flacd>, B<fa-rip>, B<fa-tags> - archive CDs to single FLAC files
 
 B<fa-flacd> [B<-jv>]
 
-B<fa-rip>
+B<fa-rip> [B<-d> I<device>] [B<-t> I<track-count>]
 
 B<fa-tags> I<track-count>
 
@@ -86,12 +86,7 @@ sub flac {
     chdir($dir) or die("chdir($dir): $!");
 
     $outfile = "$album";
-    for ($outfile) {
-        s/\//_/g;
-        s/:/_/g;
-        s/'/_/g;
-        s/"/_/g;
-    }
+    $outfile =~ s/\//_/g;
 
     verbose("Running flac\n");
     $status = system('flac', '-o', "../$artist/$outfile.flac-tmp",
@@ -110,8 +105,6 @@ sub flac {
     verbose("Cleaning up $dir\n");
     unlink('using-tags') or die("unlink(using-tags): $!");
     unlink('cue') or die("unlink(cue): $!");
-    rename('toc', "../$artist/$outfile.toc")
-      or die("rename(toc, ../$artist/$outfile.toc): $!");
     rename('log', "../$artist/$outfile.log")
       or die("rename(log, ../$artist/$outfile.log): $!");
     chdir('..') or die("chdir(..): $!");
@@ -256,10 +249,16 @@ artist directory (and named by album) and the ID directory is removed.
 =head2 FA-RIP
 
 B<fa-rip> uses C<mktemp(1)> to create a directory for storage of its
-intermediate files.  It uses C<cdrdao(1)> to create the "cue" file and
+intermediate files.  It uses C<mkcue(1)> to create the "cue" file and
 then passes the number of tracks (from the "cue" file) as command-line
-arguments to B<fa-tags>.  Finally, it execs C<cdparanoia(1)> to rip
-the CD to the "wav" file.
+arguments to B<fa-tags>.
+
+If B<-t> I<track-count> is specified, that number is used instead of
+counting tracks in the "cue" file, and is also passed to C<mkcue(1)>
+to ensure that only that number of tracks is listed in the "cue" file.
+This is handy if the CD has stupid data tracks.
+
+Finally, it execs C<cdparanoia(1)> to rip the CD to the "wav" file.
 
 In order for this CD to be processed by B<fa-flacd>, the user must
 create a "tags" file.  This is usually done by renaming one of the