diff --git a/deezer/__init__.py b/deezer/__init__.py index a4c527f..0832c66 100644 --- a/deezer/__init__.py +++ b/deezer/__init__.py @@ -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)