diff --git a/beets/autotag/hooks.py b/beets/autotag/hooks.py index d15cba269..ec7047b7c 100644 --- a/beets/autotag/hooks.py +++ b/beets/autotag/hooks.py @@ -72,8 +72,8 @@ class AlbumInfo(object): - ``data_source``: The original data source (MusicBrainz, Discogs, etc.) - ``data_url``: The data source release URL. - The fields up through ``tracks`` are required. The others are - optional and may be None. + ``mediums`` along with the fields up through ``tracks`` are required. + The others are optional and may be None. """ def __init__(self, album, album_id, artist, artist_id, tracks, asin=None, albumtype=None, va=False, year=None, month=None, day=None, diff --git a/beetsplug/spotify.py b/beetsplug/spotify.py index b94d0e8e6..75f2c8523 100644 --- a/beetsplug/spotify.py +++ b/beetsplug/spotify.py @@ -205,6 +205,7 @@ class SpotifyPlugin(BeetsPlugin): month=month, day=day, label=response_data['label'], + mediums=max(medium_totals.keys()), data_source='Spotify', data_url=response_data['external_urls']['spotify'], ) @@ -286,8 +287,6 @@ class SpotifyPlugin(BeetsPlugin): if not artist_id: artist_id = artist['id'] name = artist['name'] - # Strip disambiguation number. - name = re.sub(r' \(\d+\)$', '', name) # Move articles to the front. name = re.sub(r'^(.*?), (a|an|the)$', r'\2 \1', name, flags=re.I) artist_names.append(name)