Add attributes to hooks.

This commit is contained in:
temrix 2019-09-19 00:31:43 +02:00
parent b4edc1f832
commit 067358711e
No known key found for this signature in database
GPG key ID: 1DAF66EBB61678D2
2 changed files with 8 additions and 1 deletions

View file

@ -185,6 +185,9 @@ def apply_metadata(album_info, mapping):
'work',
'mb_workid',
'work_disambig',
'bpm',
'musical_key',
'genre'
)
}

View file

@ -179,7 +179,8 @@ class TrackInfo(object):
disctitle=None, artist_credit=None, data_source=None,
data_url=None, media=None, lyricist=None, composer=None,
composer_sort=None, arranger=None, track_alt=None,
work=None, mb_workid=None, work_disambig=None):
work=None, mb_workid=None, work_disambig=None, bpm=None,
musical_key=None, genre=None):
self.title = title
self.track_id = track_id
self.release_track_id = release_track_id
@ -204,6 +205,9 @@ class TrackInfo(object):
self.work = work
self.mb_workid = mb_workid
self.work_disambig = work_disambig
self.bpm = bpm
self.musical_key = musical_key
self.genre = genre
# As above, work around a bug in python-musicbrainz-ngs.
def decode(self, codec='utf-8'):