Merge with bugfix-0.5 0.5.12

file:e3228e47231fe2c3adbc7be62914dc142f695a20 -> file:f47363a5db92f45b8b1fb44ab6513869c5245dfb
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mp3togo (0.5.12) unstable; urgency=low
+
+ * Fixed eyeD3 to work without ID3 present.
+ Bug reported by Konsantin Pastbin.
+ Added --no-guessing-tags option.
+
+ -- Simeon Veldstra <reallifesim@gmail.com> Mon, 11 Jun 2007 19:48:03 -0700
+
mp3togo (0.5.11) unstable; urgency=low
* Fixed ommited year and tracknumber tags on mp3 conversions using eyeD3.
file:d885941fc4c93295c38a296f04b9dc3d0840c617 -> file:b0072736f0b1ebc3e5f0867bac438b0e3154b5c7
--- 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, Sat 09 Jun 2007, 20:36
+.\" created by instant / docbook-to-man, Mon 11 Jun 2007, 19:51
file:a9172f2a1028c58af20458eef79f9c84471be2bd -> file:9f782ee4c508e51b25be41d1d072d77af4eded06
--- a/mp3togo/conf.py
+++ b/mp3togo/conf.py
@@ -93,6 +93,8 @@ class Options(options.Options):
'''A string specifying the format for the output files. The format string can contain the following escapes:<li>%a - Artist<li>%l - Album<li>%t - Title<li>%y - Year<li>%g - Genre<li>%% - Literal '%'<br>Overrides --tree-depth.'''),
('notags', '', 'no-tags', False, None,
'''Do not try to write tags to the output files.'''),
+ ('noguesstags', '', 'no-guessing-tags', False, None,
+ '''Do not attempt to guess missing tags from the file name.'''),
('maxunits', 'm', 'max-size', '0', self._units,
'''The disk space available to use in bytes. Append 'M' for megabytes, 'G' for gigabytes or 'K' for kilobytes. Use 0 to use all available space on the filesystem.'''),
('maxsize', '', '', 0L, None, ''),
file:41c38e52135dd61eb50fff6d27d716768b0df691 -> file:3ec89c08ab32e92c5219bc227d36ace99b32559a
--- a/mp3togo/tags.py
+++ b/mp3togo/tags.py
@@ -94,7 +94,7 @@ class Tags(UserDict.DictMixin):
o['GENRE'] = 'Other'
return o
- if self._type == 'mp3' and HAVE_ID3:
+ if self._type == 'mp3':
rok = False
if HAVE_eyeD3:
eye = eyeD3.Tag()
@@ -112,10 +112,9 @@ class Tags(UserDict.DictMixin):
except eyeD3.tag.GenreException:
self._tags['GENRE'] = 'Other'
del eye
- rok = True
except eyeD3.tag.TagException:
pass
- if HAVE_ID3 and not rok:
+ elif HAVE_ID3:
info = ID3.ID3(self._file, as_tuple=1).as_dict()
self._tags = copytags(info)
del info
@@ -141,10 +140,15 @@ class Tags(UserDict.DictMixin):
path = path.replace('_', ' ')
for id, depth in [('ARTIST', -3), ('ALBUM', -2), ('TITLE', -1)]:
if not id in self._tags or self._tags[id][0] == '':
- try:
- self._tags[id] = [path.split(os.sep)[depth]]
- except IndexError:
- self._tags[id] = "%s unknown" % id.lower()
+ if self._opts['noguesstags']:
+ self._tags[id] = ['']
+ else:
+ try:
+ self._tags[id] = [path.split(os.sep)[depth]]
+ self._opts.log(1, "Missing %s tag, guessing %s from file name." %
+ (id, self._tags[id][0]))
+ except IndexError:
+ self._tags[id] = "%s unknown" % id.lower()
self._readok.set()
self._lock.release()