Updated after feedback from @wisp3rwind

This commit is contained in:
Andrew Rogl 2021-10-02 21:39:26 +10:00
parent 39def81d1c
commit ade9978f7e
2 changed files with 5 additions and 6 deletions

View file

@ -206,13 +206,12 @@ class DiscogsPlugin(BeetsPlugin):
self._log.debug('Searching for release {0}', album_id)
# Discogs-IDs are simple integers. We only look for those at the end
# of an input string as to avoid confusion with other metadata plugins.
# of an input string or after the "/release/" keyword 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.
# Issue #4080 highlighted that Discogs changed the way the URL
# is formed
match = re.search(r'(^|[*r|discogs\.com/.+/release/])(\d+)($|)',
album_id)
match = re.search(
r"(^|\[*r|discogs\.com.*/release/)(\d+)(|\])", album_id)
if not match:
return None

View file

@ -39,7 +39,7 @@ Bug fixes:
* :doc:`/plugins/lyrics`: Fix crash bug when beautifulsoup4 is not installed.
:bug:`4027`
* :doc:`/plugins/discogs`: Fix regex for new style of regex.
* :doc:`/plugins/discogs`: Adapt regex to new URL format .
:bug: `4080`
1.5.0 (August 19, 2021)