From: Simeon Veldstra Date: Mon, 19 Feb 2007 06:49:11 +0000 (-0800) Subject: Fixed uncaught exception thrown by eyeD3 on 2 digit years. X-Git-Tag: v0.5.11 X-Git-Url: http://puddle.ca/cgi-bin/gitweb.cgi?p=mp3togo;a=commitdiff;h=e8f1a0dbfa4f7d34d84203c8e2d5f95f9603b339 Fixed uncaught exception thrown by eyeD3 on 2 digit years. --- --- a/README +++ b/README @@ -1,7 +1,7 @@ mp3togo -(C) 2004 - 2006 Simeon Veldstra +(C) 2004 - 2007 Simeon Veldstra INSTALLING --- a/copyright +++ b/copyright @@ -2,7 +2,7 @@ mp3togo Software to manage playlists for mp3 players. -(C) Copyright 2004-2006 Simeon Veldstra +(C) Copyright 2004-2007 Simeon Veldstra Some rights reserved. This software is free and may be redistributed under the --- 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 Feb 2007, 19:29 +.\" created by instant / docbook-to-man, Thu 15 Feb 2007, 17:18 --- a/mp3togo/tags.py +++ b/mp3togo/tags.py @@ -95,18 +95,23 @@ class Tags(UserDict.DictMixin): return o if self._type == 'mp3' and HAVE_ID3: + rok = False 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 ''] try: - self._tags['GENRE'] = [getattr(eye.getGenre(), 'name', 'Other')] - except eyeD3.tag.GenreException: - self._tags['GENRE'] = 'Other' - del eye - elif HAVE_ID3: + eye.link(self._file) + self._tags['ARTIST'] = [eye.getArtist() or ''] + self._tags['ALBUM'] = [eye.getAlbum() or ''] + self._tags['TITLE'] = [eye.getTitle() or ''] + try: + self._tags['GENRE'] = [getattr(eye.getGenre(), 'name', 'Other')] + except eyeD3.tag.GenreException: + self._tags['GENRE'] = 'Other' + del eye + rok = True + except eyeD3.tag.TagException: + pass + if HAVE_ID3 and not rok: info = ID3.ID3(self._file, as_tuple=1).as_dict() self._tags = copytags(info) del info