Modded the output for fields in the parser code
[clinton/abcde.git] / abcde
diff --git a/abcde b/abcde
index 17ebeb1..aec7bcd 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Copyright (c) 1998-2001 Robert Woodcock <rcw@debian.org>
 #!/bin/sh
 # Copyright (c) 1998-2001 Robert Woodcock <rcw@debian.org>
-# Copyright (c) 2003-2004 Jesus Climent <jesus.climent@hispalinux.es>
+# Copyright (c) 2003-2005 Jesus Climent <jesus.climent@hispalinux.es>
 # This code is hereby licensed for public consumption under either the
 # GNU GPL v2 or greater, or Larry Wall's Artistic license - your choice.
 #
 # This code is hereby licensed for public consumption under either the
 # GNU GPL v2 or greater, or Larry Wall's Artistic license - your choice.
 #
@@ -1333,13 +1333,13 @@ do_cddbparse ()
        if [ X"$SHOWCDDBYEAR" = "Xy" ]; then
                PARSEDYEAR=$(grep DYEAR "${CDDBPARSEFILE}" | cut '-d=' -f2-)
                if [ X"$PARSEDYEAR" = "X" ]; then
        if [ X"$SHOWCDDBYEAR" = "Xy" ]; then
                PARSEDYEAR=$(grep DYEAR "${CDDBPARSEFILE}" | cut '-d=' -f2-)
                if [ X"$PARSEDYEAR" = "X" ]; then
-                       echo "YEAR=$PARSEDYEAR"
+                       echo "Year: $PARSEDYEAR"
                fi
        fi
        if [ X"$SHOWCDDBGENRE" = "Xy" ]; then
                PARSEDGENRE=$(grep DGENRE "${CDDBPARSEFILE}" | cut '-d=' -f2-)
                if [ X"$PARSEDGENRE" = "X" ]; then
                fi
        fi
        if [ X"$SHOWCDDBGENRE" = "Xy" ]; then
                PARSEDGENRE=$(grep DGENRE "${CDDBPARSEFILE}" | cut '-d=' -f2-)
                if [ X"$PARSEDGENRE" = "X" ]; then
-                       echo "GENRE=$PARSEDGENRE"
+                       echo "Genre: $PARSEDGENRE"
                fi
        fi
        if [ ! "$ONETRACK" = "y" ]; then
                fi
        fi
        if [ ! "$ONETRACK" = "y" ]; then
@@ -1619,6 +1619,7 @@ do_cddbedit ()
                                        fi
                                        
                                        CDDBCHOICENUM=""
                                        fi
                                        
                                        CDDBCHOICENUM=""
+                                       CDCHOICENUM=-1
                                        # I'll take CDDB read #3 for $400, Alex
                                        while [ $CDCHOICENUM -lt 0 ] || [ $CDCHOICENUM -gt $CDDBCHOICES ]; do
                                                echo -n "Which entry would you like abcde to use (0 for none)? [0-$CDDBCHOICES]: " >&2
                                        # I'll take CDDB read #3 for $400, Alex
                                        while [ $CDCHOICENUM -lt 0 ] || [ $CDCHOICENUM -gt $CDDBCHOICES ]; do
                                                echo -n "Which entry would you like abcde to use (0 for none)? [0-$CDDBCHOICES]: " >&2
@@ -2268,7 +2269,7 @@ fi
 
 # Parse command line options
 #while getopts 1a:A:bc:C:d:Dehj:klLmMnNo:pPr:Rs:S:t:T:vVxw:W: opt ; do
 
 # Parse command line options
 #while getopts 1a:A:bc:C:d:Dehj:klLmMnNo:pPr:Rs:S:t:T:vVxw:W: opt ; do
-while getopts 1a:bc:C:d:Dehj:klLmMnNo:pPr:Rs:S:vVxw:W: opt ; do
+while getopts 1a:bc:C:d:Dehj:klLmMnNo:pPr:Rs:S:t:T:vVxw:W: opt ; do
        case "$opt" in
                1) ONETRACK=y ;;
                a) ACTIONS="$OPTARG" ;;
        case "$opt" in
                1) ONETRACK=y ;;
                a) ACTIONS="$OPTARG" ;;
@@ -2735,7 +2736,7 @@ fi
 
 # Here it used to say:
 # One thousand lines in, we can start doing stuff with things
 
 # Here it used to say:
 # One thousand lines in, we can start doing stuff with things
-# Well, right now we are at line 2695 ;)
+# Well, right now we are at line 2736 ;)
 
 # Export needed things so they can be read in this subshell
 export CDDBTOOL ABCDETEMPDIR TRACKQUEUE LOWDISK EJECTCD EJECT EJECTOPTS
 
 # Export needed things so they can be read in this subshell
 export CDDBTOOL ABCDETEMPDIR TRACKQUEUE LOWDISK EJECTCD EJECT EJECTOPTS