Add a recommends for vorbis-tools (Closes: #392843)
[clinton/abcde.git] / abcde
diff --git a/abcde b/abcde
index 6cb9600..5186a0f 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -548,7 +548,7 @@ do_replaygain()
                                        run_command replaygain-vorbis nice $ENCNICE $VORBISGAIN --album "${OUTPUTFILES[@]}"
                                        ;;
                                mp3)
-                                       run_command replaygain-mp3 nice $ENCNICE $MP3GAIN -a "${OUTPUTFILES[@]}"
+                                       run_command replaygain-mp3 nice $ENCNICE $MP3GAIN -a -k "${OUTPUTFILES[@]}"
                                        ;;
                                mpc)
                                        run_command replaygain-mpc nice $ENCNICE $MPPGAIN --auto "${OUTPUTFILES[@]}"
@@ -2206,11 +2206,21 @@ do_cddbstat ()
                                RESPONSECODE=$(head -n 1 "$ABCDETEMPDIR/cddbstat" | cut -f1 -d' ')
                                case "$RESPONSECODE" in
                                210)    # 210 OK, status information follows (until terminating `.')
-                                       rc=0;
+                                       rc=0
                                        ;;
-                               501|*)  # 501 Illegal CDDB protocol level: <n>. 
+                               501)  # 501 Illegal CDDB protocol level: <n>. 
                                        CDDBPROTO=`expr $CDDBPROTO - 1`
                                        ;;
+                               *)      # Try a cddb query, since freedb2.org doesn't support the stat or ver commands
+                                       # FreeDB TESTCD disc-id is used for query
+                                       $CDDBTOOL query $CDDBURL $CDDBPROTO $CDDBUSER $CDDBHOST 03015501 1 296 344 > "$ABCDETEMPDIR/cddbstat"
+                                       RESPONSECODE=$(head -n 1 "$ABCDETEMPDIR/cddbstat" | cut -f1 -d' ')
+                                       case "$RESPONSECODE" in
+                                               2??)    # Server responded, everything seems OK
+                                                       rc=0
+                                                       ;;
+                                       esac
+                                       ;;
                                esac 
                        done
                        if test $rc -eq 1; then