From c4f2fffb63d2d7c118b36eaf10c0b622a286e3dc Mon Sep 17 00:00:00 2001 From: Andrew Rogl Date: Sat, 2 Oct 2021 14:12:01 +1000 Subject: [PATCH] Fix #4080 Tested with https://www.discogs.com/SHOUSE-Love-Tonight-Robin-Schulz-Remix/release/20356324 https://www.discogs.com/release/20356324-SHOUSE-Love-Tonight-Robin-Schulz-Remix --- beetsplug/discogs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 76036f1be..5ff298db9 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -209,8 +209,10 @@ class DiscogsPlugin(BeetsPlugin): # of an input string as to avoid confusion with other metadata plugins. # An optional bracket can follow the integer, as this is how discogs # displays the release ID on its webpage. - match = re.search(r'(^|\[*r|discogs\.com/.+/release/)(\d+)($|\])', + # Issue #4080 highlighted that Discogs changed the way the URL is formed + match = re.search(r'(^|[*r|discogs\.com/.+/release/])(\d+)($|)', album_id) + if not match: return None result = Release(self.discogs_client, {'id': int(match.group(2))})