mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2024-12-29 11:06:14 +00:00
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
|
#!/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']
|
return self.gw_api_call('deezer.getChildAccounts')['results']
|
||||||
|
|
||||||
def get_track_gw(self, sng_id):
|
def get_track_gw(self, sng_id):
|
||||||
if int(sng_id) < 0:
|
body = None
|
||||||
body = self.gw_api_call('song.getData', {'sng_id': sng_id})
|
if int(sng_id) > 0:
|
||||||
else:
|
try:
|
||||||
body = self.gw_api_call('deezer.pageTrack', {'sng_id': sng_id})
|
body = self.gw_api_call('deezer.pageTrack', {'sng_id': sng_id})
|
||||||
|
except:
|
||||||
|
body = None
|
||||||
|
if body:
|
||||||
if 'LYRICS' in body['results']:
|
if 'LYRICS' in body['results']:
|
||||||
body['results']['DATA']['LYRICS'] = body['results']['LYRICS']
|
body['results']['DATA']['LYRICS'] = body['results']['LYRICS']
|
||||||
body['results'] = body['results']['DATA']
|
body['results'] = body['results']['DATA']
|
||||||
|
else:
|
||||||
|
body = self.gw_api_call('song.getData', {'sng_id': sng_id})
|
||||||
return body['results']
|
return body['results']
|
||||||
|
|
||||||
def get_tracks_gw(self, ids):
|
def get_tracks_gw(self, ids):
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="deemix",
|
name="deemix",
|
||||||
version="1.5.15",
|
version="1.5.16",
|
||||||
description="A barebone deezer downloader library",
|
description="A barebone deezer downloader library",
|
||||||
long_description=README,
|
long_description=README,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
|
Loading…
Reference in a new issue