We only need to strip the disambiguation from artist names, not the join strings.

This commit is contained in:
Tai Lee 2013-05-25 12:19:48 +10:00
parent 72f0505744
commit 3f4e194c41

View file

@ -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