discogs: Fix discogs_albumid extraction
Use extract_release_id_regex instead of extract_release_id to get the
release ID out ouf the Discogs release URL.
@@ -326,7 +326,7 @@ class DiscogsPlugin(BeetsPlugin):
else:
genre = base_genre
- discogs_albumid = self.extract_release_id(result.data.get('uri'))
+ discogs_albumid = self.extract_release_id_regex(result.data.get('uri'))
# Extract information for the optional AlbumInfo fields that are
# contained on nested discogs fields.
@@ -378,12 +378,6 @@ class DiscogsPlugin(BeetsPlugin):
else:
return None
- def extract_release_id(self, uri):
- if uri:
- return uri.split("/")[-1]
- else:
- return None
-
def get_tracks(self, tracklist):
"""Returns a list of TrackInfo objects for a discogs tracklist.
"""
