Fixed issues with songs without lyrics

Updated PyPi to 1.5.16
This commit is contained in:
RemixDev 2020-10-15 00:33:16 +02:00
parent 435069d9c2
commit 4567391a4a
3 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,3 @@
#!/usr/bin/env python3
__version__ = "1.5.15"
__version__ = "1.5.16"

View file

@ -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 = self.gw_api_call('deezer.pageTrack', {'sng_id': sng_id})
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):

View file

@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
setup(
name="deemix",
version="1.5.15",
version="1.5.16",
description="A barebone deezer downloader library",
long_description=README,
long_description_content_type="text/markdown",