fix lastid bug when plurality artist name was None

This commit is contained in:
Adrian Sampson 2010-10-10 12:37:45 -07:00
parent 68b051f8a0
commit 5cab0ede24
3 changed files with 9 additions and 4 deletions

4
NEWS
View file

@ -1,3 +1,7 @@
1.0b6
-----
* Fix crash in lastid when the artist name is not available.
1.0b5
-----
* A new plugin, "lastid", adds Last.fm acoustic fingerprinting support

View file

@ -108,9 +108,10 @@ class LastIdPlugin(BeetsPlugin):
# Compare artist to MusicBrainz metadata.
dist, dist_max = 0.0, 0.0
dist += autotag.string_dist(last_artist, info['artist']) \
* autotag.ARTIST_WEIGHT
dist_max += autotag.ARTIST_WEIGHT
if last_artist:
dist += autotag.string_dist(last_artist, info['artist']) \
* autotag.ARTIST_WEIGHT
dist_max += autotag.ARTIST_WEIGHT
log.debug('Last artist (%s/%s) distance: %f' %
(last_artist, info['artist'], dist/dist_max))

View file

@ -22,7 +22,7 @@ def _read(fn):
return open(path).read()
setup(name='beets',
version='1.0b5',
version='1.0b6',
description='music tagger and library organizer',
author='Adrian Sampson',
author_email='adrian@radbox.org',