Package: jack
Version: 3.1.1+cvs20050801-25
Severity: normal
Tags: patch
Hi!
When I try to send a submission to a freedb server, the list of
categories appearing on the screen does not contain 'blues' (which is a
freedb category) and contains 'null' (which is not a freedb category).
I think that a few changes must be made to jack_freedb.py:
* when the list is fetched from the server, it is unnecessarily
initialised with "null"
* subtract 1 to the index to get the correct category
* When the list is displayed, the index is running from 1 to len(cat)-1,
missing the first item.
The attached patch solved the problem for me, to be applied after the
already very long list of patches.
Best regards,
Cédric
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (990, 'unstable'), (700, 'experimental'), (500, 'testing')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.29-1-powerpc
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages jack depends on:
ii cdda2wav 9:1.1.9-1 Dummy transition package for iceda
ii cdparanoia 3.10.2+debian-5 audio extraction tool for sampling
ii flac 1.2.1-1.2 Free Lossless Audio Codec - comman
ii python 2.5.4-2 An interactive high-level object-o
ii python-cddb 1.4-5.1+b1 Python interface to CD-IDs and Fre
ii python-eyed3 0.6.17-1 Python module for id3-tags manipul
ii python-pyvorbis 1.3-2 A Python interface to the Ogg Vorb
ii python-support 1.0.2 automated rebuilding support for P
ii vorbis-tools 1.2.0-6 several Ogg Vorbis tools
jack recommends no packages.
jack suggests no packages.
-- no debconf information
--- jack-3.1.1+cvs20050801/jack_freedb.py 2009-07-07 21:04:06.000000000 +0200
+++ jack-3.1.1+cvs20050801-cb/jack_freedb.py 2009-07-07 21:03:22.000000000 +0200
@@ -761,11 +761,11 @@
def choose_cat(cat = ["blues", "classical", "country", "data", "folk", "jazz", "misc", "newage", "reggae", "rock", "soundtrack"]):
print "choose a category:"
cat.sort()
- for i in range(1, len(cat)):
- print "%2d" % i + ".) " + cat[i]
+ for i in range(0, len(cat)):
+ print "%2d" % (i+1) + ".) " + cat[i]
x = -1
- while x < 0 or x > len(cat) - 1:
+ while x < 0 or x > len(cat):
if jack_progress.status_all.has_key('freedb_cat') and jack_progress.status_all['freedb_cat'][-1] in cat:
input = raw_input(" 0.) none of the above (default='%s'): " % jack_progress.status_all['freedb_cat'][-1])
if not input:
@@ -782,7 +782,7 @@
print "ok, aborting."
sys.exit(0)
- return cat[x]
+ return cat[x-1]
def do_freedb_submit(file, cd_id, cat = None):
import httplib
@@ -798,7 +798,7 @@
cat = choose_cat()
elif buf[0:3] == "210":
- cat = ["null", ]
+ cat = []
while 1:
buf = f.readline()
if not buf: