Attempt to address the comments from sampsyo

Undoes the changes to autotag/hooks.py

If trackdisambig is not set to None at some point in time, the
test case for a non-existent trackdisambig fails. as such, try
to get the disambiguation with a default of None when setting
trackdisambig. Not sure if this is reasonable.
This commit is contained in:
Adam Tygart 2021-02-27 15:23:35 -06:00
parent 1b1209a6c3
commit f3e7edb21e
2 changed files with 2 additions and 4 deletions

View file

@ -163,7 +163,7 @@ class TrackInfo(AttrDict):
composer=None, composer_sort=None, arranger=None,
track_alt=None, work=None, mb_workid=None,
work_disambig=None, bpm=None, initial_key=None, genre=None,
trackdisambig=None, **kwargs):
**kwargs):
self.title = title
self.track_id = track_id
self.release_track_id = release_track_id
@ -191,7 +191,6 @@ class TrackInfo(AttrDict):
self.bpm = bpm
self.initial_key = initial_key
self.genre = genre
self.trackdisambig = trackdisambig
self.update(kwargs)
# As above, work around a bug in python-musicbrainz-ngs.

View file

@ -223,8 +223,7 @@ def track_info(recording, index=None, medium=None, medium_index=None,
if recording.get('length'):
info.length = int(recording['length']) / (1000.0)
if recording.get('disambiguation'):
info.trackdisambig = recording.get('disambiguation')
info.trackdisambig = recording.get('disambiguation', None)
lyricist = []
composer = []