Fix up handling of the first few sectors
authorSteve McIntyre <steve@einval.com>
Thu, 12 Jan 2017 16:09:20 +0000 (16:09 +0000)
committerSteve McIntyre <steve@einval.com>
Thu, 12 Jan 2017 16:09:20 +0000 (16:09 +0000)
when reading from a whole-CD flac file or using cdparanoia in
one-track mode. Thanks to Matthias König for the patch. Closes Issue
44: https://abcde.einval.com/bugzilla/show_bug.cgi?id=44

abcde
changelog

diff --git a/abcde b/abcde
index 76d64ac..c8cd296 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -3282,11 +3282,13 @@ do_cdread ()
                LASTTRACK=$(expr $3 + 0)
                UTRACKNUM=$FIRSTTRACK
                case "$CDROMREADERSYNTAX" in
-                       flac) READTRACKNUMS="$FIRSTTRACK.1-$(($LASTTRACK + 1)).0" ;;
+                       flac) READTRACKNUMS="-" ;;
                        cdparanoia|libcdio)
                                #XX FIXME XX
-                               # Add a variable to check if tracks are provided in command line and if not, use "0-" to rip the tracks
-                               READTRACKNUMS="$FIRSTTRACK-$LASTTRACK" ;;
+                               # Add a variable to check if tracks are provided in command line and if not, rip the whole CD
+                               # We must make sure to rip from sector 0, both lines below work
+                               # READTRACKNUMS="-- -$LASTTRACK" ;;
+                               READTRACKNUMS="[.0]-" ;;
                        cdda2wav | icedax) READTRACKNUMS="$FIRSTTRACK+$LASTTRACK" ;;
                        pird) READTRACKNUMS="$FIRSTTRACK..$LASTTRACK" ;;
                        *) echo "abcde error: $CDROMREADERSYNTAX does not support ONETRACK mode"
index aca979d..ec478c5 100644 (file)
--- a/changelog
+++ b/changelog
@@ -19,6 +19,10 @@ abcde 2.8
     https://abcde.einval.com/bugzilla/show_bug.cgi?id=42
   * Add Recommends on glyrc and imagemagick in Debian packaging. Closes
     Debian Bug #827626
+  * Fix up handling of the first few sectors when reading
+    from a whole-CD flac file or using cdparanoia in one-track
+    mode. Thanks to Matthias König for the patch. Closes Issue 44:
+    https://abcde.einval.com/bugzilla/show_bug.cgi?id=44
 
 abcde 2.7.2