Re-enable some commented out cdparanoia/debug code in do_discid.
authorSteve McIntyre <steve@einval.com>
Fri, 13 Jan 2017 00:09:57 +0000 (00:09 +0000)
committerSteve McIntyre <steve@einval.com>
Fri, 13 Jan 2017 00:09:57 +0000 (00:09 +0000)
Closes Issue 14:
https://abcde.einval.com/bugzilla/show_bug.cgi?id=14

Can't find any reason why this code was ever disabled...!

abcde
changelog

diff --git a/abcde b/abcde
index c8cd296..f88c204 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -2000,20 +2000,20 @@ do_discid ()
                                        exit 1
                                fi
                                ;;
-#                      cdparanoia|debug)
-#                              CDPARANOIAOUTPUT="$( $CDROMREADER -$CDPARANOIACDROMBUS "$CDROM" -Q --verbose 2>&1 )"
-#                              RET=$?
-#                              if [ ! "$RET" = "0" ];then
-#                                      log warning "something went wrong while querying the CD... Maybe a DATA CD?"
-#                              fi
-#
-#                              TRACKS="$(echo "$CDPARANOIAOUTPUT" | grep -E '^[[:space:]]+[[:digit:]]' | tail -n 1 | get_first | tr -d "." | tr '\n' ' ')"
-#                              CDPARANOIAAUDIOTRACKS="$TRACKS"
-#
-#                              LEADOUT="$(echo "$CDPARANOIAOUTPUT" | grep -Eo '^TOTAL[[:space:]]+([[:digit:]]+)' | get_last)"
-#                              OFFSETS="$(echo "$CDPARANOIAOUTPUT" | sed -n -e's/^ .* \([0-9]\+\) \[.*/\1/p')"
-#                              makeids
-#                              ;;
+                       cdparanoia|debug)
+                               CDPARANOIAOUTPUT="$( $CDROMREADER -$CDPARANOIACDROMBUS "$CDROM" -Q --verbose 2>&1 )"
+                               RET=$?
+                               if [ ! "$RET" = "0" ];then
+                                       log warning "something went wrong while querying the CD... Maybe a DATA CD?"
+                               fi
+
+                               TRACKS="$(echo "$CDPARANOIAOUTPUT" | grep -E '^[[:space:]]+[[:digit:]]' | tail -n 1 | get_first | tr -d "." | tr '\n' ' ')"
+                               CDPARANOIAAUDIOTRACKS="$TRACKS"
+
+                               LEADOUT="$(echo "$CDPARANOIAOUTPUT" | grep -Eo '^TOTAL[[:space:]]+([[:digit:]]+)' | get_last)"
+                               OFFSETS="$(echo "$CDPARANOIAOUTPUT" | sed -n -e's/^ .* \([0-9]\+\) \[.*/\1/p')"
+                               makeids
+                               ;;
                        *)
                                case "$CDDBMETHOD" in
                                        cddb) TRACKINFO=$($CDDISCID "$CDROM") ;;
index 2bf1eac..ea3bd0e 100644 (file)
--- a/changelog
+++ b/changelog
@@ -26,6 +26,9 @@ abcde 2.8
   * Tweak the fix in musicbrainz for handling sketchy returned data
     some more. Hopefully closes Issue 30:
     https://abcde.einval.com/bugzilla/show_bug.cgi?id=30
+  * Re-enable some commented out cdparanoia/debug code in do_discid.
+    Closes Issue 14:
+    https://abcde.einval.com/bugzilla/show_bug.cgi?id=14
 
 abcde 2.7.2