Version 0.5.5 commit. v0.5.5
Changed ID3 tagging library to eyeD3 to fix issues with unicode in tags.


file:66f28442d1326a1484849d8918cacbfa10a2102a -> file:4766166d9fffbc6760f4c1c29e252e4deabf01a5
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mp3togo (0.5.5) unstable; urgency=low
+
+ * Added support for python-eyeD3 for more robust handling of unicode tags.
+ * python-ID3 is still supported and will be used if eyeD3 is not available.
+
+ -- Simeon Veldstra <reallifesim@gmail.com> Mon, 26 Jun 2006 19:17:31 -0700
+
mp3togo (0.5.4) unstable; urgency=low
* Changed the ogg decoder to oggdec from ogg123 to fix bug on Debian Stable (Sarge).
file:88af3b75fea4c0a67a7a2a4b50f4daeafbb7ef2c -> file:de9383d1c30cbaf2a458eb878699c456b31b40ff
--- a/debian/control
+++ b/debian/control
@@ -2,12 +2,13 @@ Source: mp3togo
Section: sound
Priority: optional
Maintainer: Simeon Veldstra <reallifesim@gmail.com>
-Build-Depends: cdbs, debhelper (>= 4.2.0), python, docbook-to-man
-Standards-Version: 3.6.2
+Build-Depends: cdbs, debhelper (>= 4.2.0)
+Build-Depends-Indep: python, docbook-to-man
+Standards-Version: 3.7.2
Package: mp3togo
Architecture: all
-Depends: ${python:Depends}, python-pyvorbis, python-id3, mpg321, vorbis-tools
+Depends: ${python:Depends}, python-pyvorbis, python-eyeD3, mpg321, vorbis-tools
Recommends: flac, normalize-audio
Suggests: lame, python-xmms, faad
Description: A tool for loading music on to portable mp3 players
file:38a1892a30d47984f68ec62132b8094ed0f4f630 -> file:7ee7774fab25a83486bbea7b7c253e168041e0db
--- a/debian/mp3togo.1
+++ b/debian/mp3togo.1
@@ -134,4 +134,4 @@ License can be found in /usr/share/commo
.PP
mp3togo can be found online at http://puddle.ca/mp3togo
-.\" created by instant / docbook-to-man, Mon 12 Jun 2006, 19:49
+.\" created by instant / docbook-to-man, Mon 26 Jun 2006, 19:31
file:296f2083a7336144cf4fa48b038b8443b4d22cd2 -> file:3135a9af4f1e469d511ac54c3ff190b1f34f68e9
--- a/mp3togo/__init__.py
+++ b/mp3togo/__init__.py
@@ -21,5 +21,5 @@
# __all__ = ('converter', 'main', 'options', 'setup')
-version = '0.5.4'
+version = '0.5.5'
file:fe1ae65e85f74809d3e54fa96fa96d61f03e9dff -> file:1803b06b3abe74d35e87d9b1bdbfe59601599596
--- a/mp3togo/tags.py
+++ b/mp3togo/tags.py
@@ -35,12 +35,21 @@ else:
HAVE_VORBIS = True
try:
+ import eyeD3
+except ImportError:
+ HAVE_eyeD3 = False
+else:
+ HAVE_eyeD3 = True
+
+try:
import ID3
except ImportError:
HAVE_ID3 = False
else:
HAVE_ID3 = True
+import codecs
+
HAVE_METAFLAC=False
for path in os.environ['PATH'].split(':'):
if os.path.exists(os.path.join(path, 'metaflac')):
@@ -84,9 +93,18 @@ class Tags(UserDict.DictMixin):
return o
if self._type == 'mp3' and HAVE_ID3:
- info = ID3.ID3(self._file, as_tuple=1).as_dict()
- self._tags = copytags(info)
- del info
+ if HAVE_eyeD3:
+ eye = eyeD3.Tag()
+ eye.link(self._file)
+ self._tags['ARTIST'] = [eye.getArtist() or '']
+ self._tags['ALBUM'] = [eye.getAlbum() or '']
+ self._tags['TITLE'] = [eye.getTitle() or '']
+ self._tags['GENRE'] = [eye.getGenre().name or '']
+ del eye
+ elif HAVE_ID3:
+ info = ID3.ID3(self._file, as_tuple=1).as_dict()
+ self._tags = copytags(info)
+ del info
elif self._type == 'ogg' and HAVE_VORBIS:
info = ogg.vorbis.VorbisFile(self._file).comment().as_dict()
self._tags = copytags(info)
@@ -158,14 +176,31 @@ class Tags(UserDict.DictMixin):
del out
del vf
elif fmt == 'mp3':
- out = ID3.ID3(filename, as_tuple=1)
- puttags(out)
- try:
- out.write()
- except:
- # Tagging failed, but the file should be okay.
- pass
- del out
+ if HAVE_eyeD3:
+ out = eyeD3.Tag()
+ out.link(filename, eyeD3.ID3_V1)
+ out.setVersion(eyeD3.ID3_V1)
+ d = {}
+ d = puttags(d)
+ out.setArtist(d['ARTIST'])
+ out.setAlbum(d['ALBUM'])
+ out.setTitle(d['TITLE'])
+ g = eyeD3.Genre()
+ g.setId(d['GENRE'])
+ out.setGenre(g)
+ if d.has_key('COMMENT'):
+ out.addComment(d['COMMENT'])
+ out.update()
+ del out
+ elif HAVE_ID3:
+ out = ID3.ID3(filename, as_tuple=1)
+ puttags(out)
+ try:
+ out.write()
+ except:
+ # Tagging failed, but the file should be okay.
+ pass
+ del out
else:
self._lock.release()
raise setup.ErrorUnknownFileType
@@ -179,7 +214,7 @@ class Tags(UserDict.DictMixin):
return False
try:
- ifile = file(indexname, 'a')
+ ifile = codecs.open(indexname, 'a', 'utf-8')
ifile.write(filename + "\n")
keys = self._tags.keys()
keys.sort()