mirror of
https://github.com/beetbox/beets.git
synced 2025-12-26 18:43:38 +01:00
Merge pull request #4303 from JOJ0/master
discogs: Fix discogs_albumid extraction
This commit is contained in:
commit
80a86c62b7
3 changed files with 6 additions and 7 deletions
|
|
@ -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.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ New features:
|
|||
|
||||
Bug fixes:
|
||||
|
||||
* The Discogs release ID is now populated correctly to the discogs_albumid
|
||||
field again (it was no longer working after Discogs changed their release URL
|
||||
format).
|
||||
:bug:`4225`
|
||||
* The autotagger no longer considers all matches without a MusicBrainz ID as
|
||||
duplicates of each other.
|
||||
:bug:`4299`
|
||||
|
|
|
|||
|
|
@ -337,6 +337,7 @@ class DGAlbumInfoTest(_common.TestCase):
|
|||
def test_parse_minimal_release(self):
|
||||
"""Test parsing of a release with the minimal amount of information."""
|
||||
data = {'id': 123,
|
||||
'uri': 'https://www.discogs.com/release/123456-something',
|
||||
'tracklist': [self._make_track('A', '1', '01:01')],
|
||||
'artists': [{'name': 'ARTIST NAME', 'id': 321, 'join': ''}],
|
||||
'title': 'TITLE'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue