Fixed issues with songs without lyrics
Updated PyPi to 1.5.16
This commit is contained in:
parent
435069d9c2
commit
4567391a4a
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
__version__ = "1.5.15"
|
||||
__version__ = "1.5.16"
|
||||
|
|
|
@ -271,13 +271,18 @@ class Deezer:
|
|||
return self.gw_api_call('deezer.getChildAccounts')['results']
|
||||
|
||||
def get_track_gw(self, sng_id):
|
||||
if int(sng_id) < 0:
|
||||
body = self.gw_api_call('song.getData', {'sng_id': sng_id})
|
||||
else:
|
||||
body = None
|
||||
if int(sng_id) > 0:
|
||||
try:
|
||||
body = self.gw_api_call('deezer.pageTrack', {'sng_id': sng_id})
|
||||
except:
|
||||
body = None
|
||||
if body:
|
||||
if 'LYRICS' in body['results']:
|
||||
body['results']['DATA']['LYRICS'] = body['results']['LYRICS']
|
||||
body['results'] = body['results']['DATA']
|
||||
else:
|
||||
body = self.gw_api_call('song.getData', {'sng_id': sng_id})
|
||||
return body['results']
|
||||
|
||||
def get_tracks_gw(self, ids):
|
||||
|
|
Loading…
Reference in New Issue