diff --git a/NEWS b/NEWS index 40a87fdba..eb5c82733 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/beetsplug/lastid.py b/beetsplug/lastid.py index 99622b520..fa37b07e9 100644 --- a/beetsplug/lastid.py +++ b/beetsplug/lastid.py @@ -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)) diff --git a/setup.py b/setup.py index e101ef6a7..e1a930cc6 100755 --- a/setup.py +++ b/setup.py @@ -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',