Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beets/autotag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions beetsplug/lastid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down