diff options
Diffstat (limited to 'debian/patches/99a_correct-category-list.patch')
-rw-r--r-- | debian/patches/99a_correct-category-list.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/debian/patches/99a_correct-category-list.patch b/debian/patches/99a_correct-category-list.patch new file mode 100644 index 0000000..c35c302 --- /dev/null +++ b/debian/patches/99a_correct-category-list.patch @@ -0,0 +1,54 @@ +Cédric Boutillier <cedric.boutillier@gmail.com> reports: + +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. + +See http://bugs.debian.org/536165 + +--- 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: + |