From 22ffac188b6184dbe9ddcfc492800b9e2f62b58c Mon Sep 17 00:00:00 2001 From: RemixDev Date: Mon, 13 Jul 2020 12:41:40 +0200 Subject: [PATCH] Added workaround for deezer api cap of 255 tracks This fixes #52 --- deemix/__init__.py | 2 +- deemix/app/queuemanager.py | 2 ++ setup.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deemix/__init__.py b/deemix/__init__.py index 9effa49..69a4f7d 100644 --- a/deemix/__init__.py +++ b/deemix/__init__.py @@ -1,3 +1,3 @@ #!/usr/bin/env python3 -__version__ = "1.1.6" +__version__ = "1.1.7" diff --git a/deemix/app/queuemanager.py b/deemix/app/queuemanager.py index 797cbc6..c9619d6 100644 --- a/deemix/app/queuemanager.py +++ b/deemix/app/queuemanager.py @@ -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']}", settings, bitrate, albumAPI) tracksArray = dz.get_album_tracks_gw(id) + if albumAPI['nb_tracks'] == 255: + albumAPI['nb_tracks'] = len(tracksArray) result['title'] = albumAPI['title'] result['artist'] = albumAPI['artist']['name'] diff --git a/setup.py b/setup.py index d538e12..4139e96 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text() setup( name="deemix", - version="1.1.6", + version="1.1.7", description="A barebone deezer downloader library", long_description=README, long_description_content_type="text/markdown",