discogs: Add extract_release_id_regex sanity check
Check whether any input worth pattern checking was passed.
@@ -194,6 +194,7 @@ class DiscogsPlugin(BeetsPlugin):
# patterns.
# Regex has been tested here https://regex101.com/r/wyLdB4/2
+ if album_id:
for pattern in [
r'^\[?r?(?P<id>\d+)\]?$',
r'discogs\.com/release/(?P<id>\d+)-',
@@ -202,7 +203,7 @@ class DiscogsPlugin(BeetsPlugin):
match = re.search(pattern, album_id)
if match:
return int(match.group('id'))
-
+ else:
return None
def album_for_id(self, album_id):
