Start the CDDB code with a sane "notfound" default.
authordata <data@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Mon, 16 Jan 2006 21:26:41 +0000 (21:26 +0000)
committerdata <data@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Mon, 16 Jan 2006 21:26:41 +0000 (21:26 +0000)
Check that the flac file has a cuesheet before trying to extract it.

git-svn-id: http://abcde.googlecode.com/svn/trunk@187 a0fa61bc-5347-0410-a1a9-7f54aa4e1825

abcde

diff --git a/abcde b/abcde
index 281d9d3..05f4248 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -1364,13 +1364,11 @@ do_discid ()
                        disktool -u ${CDROM#/dev/}
                fi
                if [ "$CDROMREADERSYNTAX" = "flac" ] ; then
-                       if [ "$TRACKINFO" = "" ]; then
+                       if $METAFLAC $METAFLACOPTS --export-cuesheet-to=- $CDROM > /dev/null 2>&1 ; then
                                TRACKINFO=$($METAFLAC $METAFLACOPTS --export-cuesheet-to=- $CDROM | $CUE2DISCID)
                        else
-                               if $METAFLAC $METAFLACOPTS --export-cuesheet-to=- $CDROM > /dev/null 2>&1 ; then :; else
-                                       log error "the input flac file does not contain a cuesheet."
-                                       exit 1
-                               fi
+                               log error "the input flac file does not contain a cuesheet."
+                               exit 1
                        fi
                else
                        case "$CDDBMETHOD" in
@@ -3330,6 +3328,8 @@ case "$CDDBMETHOD" in
 esac
 
 if [ "$DOCDDB" = "y" ]; then
+       # start with a sane default:
+       CDDBLOCALSTATUS=notfound
        if [ $CDDBUSELOCAL = "y" ]; then
                do_localcddb
        fi