summaryrefslogtreecommitdiff
path: root/debian/patches/64_catch_id3_error.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/64_catch_id3_error.patch')
-rw-r--r--debian/patches/64_catch_id3_error.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/64_catch_id3_error.patch b/debian/patches/64_catch_id3_error.patch
new file mode 100644
index 0000000..f4d1291
--- /dev/null
+++ b/debian/patches/64_catch_id3_error.patch
@@ -0,0 +1,29 @@
+eyeD3 only accepts years that have 4 digits; catch the exception in case
+the year contains something else. Debian bug http://bugs.debian.org/478784
+
+--- a/jack_tag.py 2008-05-04 16:28:14.000000000 +0200
++++ b/jack_tag.py 2008-05-04 16:38:50.000000000 +0200
+@@ -112,7 +112,10 @@
+ if cf['_id3_genre'] != -1:
+ tag.setGenre("(%d)" % (cf['_id3_genre']))
+ if cf['_id3_year'] != -1:
+- tag.setDate(cf['_id3_year'])
++ try:
++ tag.setDate(cf['_id3_year'])
++ except eyeD3.tag.TagException, e:
++ print "Error tagging file: %s" % e
+ tag.setPlayCount(int(i[LEN] * 1000.0 / 75 + 0.5))
+ tag.update()
+ mp3file.close()
+@@ -139,7 +142,10 @@
+ elif old_genre == None:
+ tag.setGenre("(255)") # unknown
+ if cf['_id3_year'] != -1:
+- tag.setDate(cf['_id3_year'])
++ try:
++ tag.setDate(cf['_id3_year'])
++ except eyeD3.tag.TagException, e:
++ print "Error tagging file: %s" % e
+ try:
+ tag.update()
+ except UnicodeEncodeError: