From c9c1123756ed233b01dd6619e6d548b036c9e1b4 Mon Sep 17 00:00:00 2001 From: J0J0 T Date: Tue, 1 Mar 2022 07:44:39 +0100 Subject: [PATCH] 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. --- beetsplug/discogs.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 875842f83..820a0acbd 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -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. """