From 4d571b228144363ba3ae2704c74d8561ede9b527 Mon Sep 17 00:00:00 2001 From: mdecker Date: Mon, 4 Apr 2011 11:22:31 +0200 Subject: [PATCH] fix lastid plugin breakage introduced in f256726 --- beets/autotag/__init__.py | 2 +- beetsplug/lastid.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/beets/autotag/__init__.py b/beets/autotag/__init__.py index b3cf6975ac..a5d677d2d1 100644 --- a/beets/autotag/__init__.py +++ b/beets/autotag/__init__.py @@ -218,7 +218,7 @@ def string_dist(str1, str2): def _plurality(objs): """Given a sequence of comparable objects, returns the object that - is most common in the set. + is most common in the set and if it is the only object is the set. """ # Calculate frequencies. freqs = defaultdict(int) diff --git a/beetsplug/lastid.py b/beetsplug/lastid.py index fa37b07e94..99e60c9d47 100644 --- a/beetsplug/lastid.py +++ b/beetsplug/lastid.py @@ -70,8 +70,8 @@ def get_cur_artist(items): artist_ids.append(last_data['artist_mbid']) # Vote on the most popular artist. - artist = autotag._plurality(artists) - artist_id = autotag._plurality(artist_ids) + artist, _ = autotag._plurality(artists) + artist_id, _ = autotag._plurality(artist_ids) return artist, artist_id