Added workaround for deezer api cap of 255 tracks

This fixes #52
This commit is contained in:
RemixDev 2020-07-13 12:41:40 +02:00
parent 73304e06c5
commit 22ffac188b
3 changed files with 4 additions and 2 deletions

View File

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

View File

@ -132,6 +132,8 @@ def generateQueueItem(dz, sp, url, settings, bitrate=None, albumAPI=None, interf
return generateQueueItem(dz, sp, f"https://www.deezer.com/track/{albumAPI['tracks']['data'][0]['id']}", return generateQueueItem(dz, sp, f"https://www.deezer.com/track/{albumAPI['tracks']['data'][0]['id']}",
settings, bitrate, albumAPI) settings, bitrate, albumAPI)
tracksArray = dz.get_album_tracks_gw(id) tracksArray = dz.get_album_tracks_gw(id)
if albumAPI['nb_tracks'] == 255:
albumAPI['nb_tracks'] = len(tracksArray)
result['title'] = albumAPI['title'] result['title'] = albumAPI['title']
result['artist'] = albumAPI['artist']['name'] result['artist'] = albumAPI['artist']['name']

View File

@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
setup( setup(
name="deemix", name="deemix",
version="1.1.6", version="1.1.7",
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",