Default bpm to None

This commit is contained in:
Rahul Ahuja 2019-09-28 11:37:58 -07:00
parent 80f54ecb9e
commit 3ffaaa1f37

View file

@ -257,8 +257,7 @@ class BeatportTrack(BeatportObject):
self.url = "https://beatport.com/track/{0}/{1}" \
.format(data['slug'], data['id'])
self.track_number = data.get('trackNumber')
if 'bpm' in data:
self.bpm = data['bpm']
self.bpm = data.get('bpm')
self.musical_key = six.text_type(
(data.get('key') or {}).get('shortName')
)