mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
fixing per review comments
This commit is contained in:
parent
f0c91b8f45
commit
55e003a3d4
1 changed files with 10 additions and 7 deletions
|
|
@ -303,13 +303,7 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
mediums = [t.medium for t in tracks]
|
||||
country = result.data.get('country')
|
||||
data_url = result.data.get('uri')
|
||||
style = result.data.get('styles')
|
||||
if style is None:
|
||||
self._log.debug('Style not Found')
|
||||
elif not style:
|
||||
return style
|
||||
else:
|
||||
style = self.config['separator'].as_str().join(sorted(style))
|
||||
style = self.format_style(result.data.get('styles'))
|
||||
|
||||
# Extract information for the optional AlbumInfo fields that are
|
||||
# contained on nested discogs fields.
|
||||
|
|
@ -354,6 +348,15 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
original_day=None, data_source='Discogs',
|
||||
data_url=data_url)
|
||||
|
||||
def format_style(self, style):
|
||||
if style is None:
|
||||
self._log.debug('Style not Found')
|
||||
elif not style:
|
||||
return style
|
||||
else:
|
||||
return self.config['separator'].as_str().join(sorted(style))
|
||||
|
||||
|
||||
def get_artist(self, artists):
|
||||
"""Returns an artist string (all artists) and an artist_id (the main
|
||||
artist) for a list of discogs album or track artists.
|
||||
|
|
|
|||
Loading…
Reference in a new issue