mirror of
https://gitlab.com/RemixDev/deezer-py.git
synced 2025-01-14 02:25:13 +00:00
fixed "list index out of range" error when getting track url
This commit is contained in:
parent
d6a0cb2c74
commit
3f558db4ab
|
@ -190,7 +190,7 @@ class Deezer:
|
|||
result.append(WrongGeolocation(self.current_user['country']))
|
||||
else:
|
||||
result.append(DeezerError(json.dumps(response)))
|
||||
if 'media' in data:
|
||||
if 'media' in data and len(data['media']):
|
||||
result.append(data['media'][0]['sources'][0]['url'])
|
||||
else:
|
||||
result.append(None)
|
||||
|
|
Loading…
Reference in a new issue