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.
This commit is contained in:
J0J0 T 2022-03-01 07:44:39 +01:00
parent 1bc00105bd
commit c9c1123756

View file

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