From 3f4e194c410c3bd3e7b62b5918df141ffc6864fa Mon Sep 17 00:00:00 2001 From: Tai Lee Date: Sat, 25 May 2013 12:19:48 +1000 Subject: [PATCH] We only need to strip the disambiguation from artist names, not the join strings. --- beetsplug/discogs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 10922eba3..da415536b 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -112,11 +112,10 @@ class DiscogsPlugin(BeetsPlugin): for artist in artists: if not artist_id: artist_id = artist['id'] - bits.append(artist['name']) + # Strip disambiguation number from artist name. + bits.append(re.sub(r' \(\d+\)$', '', artist['name'])) if artist['join']: bits.append(artist['join']) - # Remove discogs artist disambiguation number if needed. - bits = [re.sub(r' \(\d+\)$', '', bit) for bit in bits] artist = ' '.join(bits).replace(' ,', ',') or None return artist, artist_id