Tagged 2.3.99.6
[clinton/abcde.git] / abcde
diff --git a/abcde b/abcde
index 55d2831..660244f 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -354,7 +354,7 @@ checkexec ()
                # Cut off any command-line option we added in
                X=$(echo $@ | cut -d' ' -f2)
                # Test for built-in abcde.function
-               [ "$X" != "${X#abcde.}" ] && type $X >/dev/null 2&>1 && return
+               [ "$X" != "${X#abcde.}" ] && type $X >/dev/null 2>&1 && return
                if [ "$(which $X)" = "" ]; then
                        log error "$X is not in your path." >&2
                        log info  "Define the full path to the executable if it exists on your system." >&2
@@ -1520,8 +1520,12 @@ abcde.cue2discid () {
                IFS=":"
                set -- $1
                IFS="$OIFS"
+               local first second third
+               first=$(expr ${1} + 0 )
+               second=$(expr ${2} + 0 )
+               third=$(expr ${3} + 0 )
 
-               echo $(( ((($1 * 60) + $2) * 75) + $3 ))
+               echo $(( ((($first * 60) + $second) * 75) + $third ))
        }
 
        OFFSET=150
@@ -1665,6 +1669,9 @@ do_discid ()
                        flac)
                                if $METAFLAC $METAFLACOPTS --export-cuesheet-to=- "$CDROM" > /dev/null 2>&1 ; then
                                        case "$CUE2DISCID" in
+                                               # FIXME # right now we have 2 cue2discid internal
+                                               # implementations: builtin and abcde.cue2discid. Test
+                                               # both of them and decide which one we want to use.
                                                builtin)
                                                        #vecho "Using builtin cue2discid implementation..."
                                                        CUESHEET="$(metaflac $METAFLACOPTS --export-cuesheet-to=- "$CDROM")"
@@ -2132,6 +2139,7 @@ do_musicbrainzstat ()
 
 do_musicbrainz ()
 {
+# Use MBE_TOCGetCDIndexId on a perl query
        :
 }