mirror of
https://github.com/beetbox/beets.git
synced 2026-02-24 16:23:04 +01:00
Final clean up
This commit is contained in:
parent
109f4fa430
commit
b880e2db8a
2 changed files with 4 additions and 5 deletions
|
|
@ -218,10 +218,9 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
]:
|
||||
match = re.search(pattern, album_id)
|
||||
if match:
|
||||
break
|
||||
if not match:
|
||||
return None
|
||||
return int(match.group('id'))
|
||||
return int(match.group('id'))
|
||||
|
||||
return None
|
||||
|
||||
def album_for_id(self, album_id):
|
||||
"""Fetches an album by its Discogs ID and returns an AlbumInfo object
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ class DGAlbumInfoTest(_common.TestCase):
|
|||
('005b84a0-ecd6-39f1-b2f6-6eb48756b268', ''),
|
||||
]
|
||||
for test_pattern, expected in test_patterns:
|
||||
match = DiscogsPlugin().extract_release_id_regex(test_pattern)
|
||||
match = DiscogsPlugin.extract_release_id_regex(test_pattern)
|
||||
if not match:
|
||||
match = ''
|
||||
self.assertEqual(match, expected)
|
||||
|
|
|
|||
Loading…
Reference in a new issue