mirror of
https://github.com/beetbox/beets.git
synced 2025-12-28 19:42:42 +01:00
adding styles to hook and returning Style not Defined if no style set
This commit is contained in:
parent
295efde7b4
commit
6ffbd5af45
2 changed files with 5 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ class AlbumInfo(object):
|
|||
albumtype=None, va=False, year=None, month=None, day=None,
|
||||
label=None, mediums=None, artist_sort=None,
|
||||
releasegroup_id=None, catalognum=None, script=None,
|
||||
language=None, country=None, albumstatus=None, media=None,
|
||||
language=None, country=None, style=None, albumstatus=None, media=None,
|
||||
albumdisambig=None, releasegroupdisambig=None,
|
||||
artist_credit=None, original_year=None, original_month=None,
|
||||
original_day=None, data_source=None, data_url=None):
|
||||
|
|
@ -102,6 +102,7 @@ class AlbumInfo(object):
|
|||
self.script = script
|
||||
self.language = language
|
||||
self.country = country
|
||||
self.style = style
|
||||
self.albumstatus = albumstatus
|
||||
self.media = media
|
||||
self.albumdisambig = albumdisambig
|
||||
|
|
@ -121,7 +122,7 @@ class AlbumInfo(object):
|
|||
constituent `TrackInfo` objects, are decoded to Unicode.
|
||||
"""
|
||||
for fld in ['album', 'artist', 'albumtype', 'label', 'artist_sort',
|
||||
'catalognum', 'script', 'language', 'country',
|
||||
'catalognum', 'script', 'language', 'country', 'style',
|
||||
'albumstatus', 'albumdisambig', 'releasegroupdisambig',
|
||||
'artist_credit', 'media']:
|
||||
value = getattr(self, fld)
|
||||
|
|
|
|||
|
|
@ -303,8 +303,10 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
country = result.data.get('country')
|
||||
data_url = result.data.get('uri')
|
||||
style = result.data.get('styles')
|
||||
print('style', style)
|
||||
if style is None:
|
||||
self._log.info('Style not Found')
|
||||
return "Style not Defined"
|
||||
elif len(style) == 0:
|
||||
return style
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue