Add support for freedb2
authorColin Tuckley <colin@tuckley.org>
Sun, 26 Jul 2009 16:49:36 +0000 (16:49 +0000)
committerColin Tuckley <colin@tuckley.org>
Sun, 26 Jul 2009 16:49:36 +0000 (16:49 +0000)
abcde
debian/changelog

diff --git a/abcde b/abcde
index 6cb9600..7585109 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -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
index f9f1cfb..409de83 100644 (file)
@@ -7,8 +7,10 @@ abcde (2.3.99.8-1) unstable; urgency=low
   * Fix Writable temp directories not owned/writeable (Closes: #143552).
   * Fix broken range code, patch from Charles Steinkuehler (Closes: #389981).
   * Remove unneeded escapes in cddb-tool URLs.
+    Add support for freedb2 (Closes: #391110).
+    another patch from Charles Steinkuehler.
 
- -- Colin Tuckley <colint@debian.org>  Sun, 26 Jul 2009 16:58:00 +0100
+ -- Colin Tuckley <colint@debian.org>  Sun, 26 Jul 2009 17:40:23 +0100
 
 abcde (2.3.99.7-1) unstable; urgency=low