From 050b25471f4b84c3130ea0228436948f65b4a822 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Wed, 30 Sep 2020 16:19:14 +0200 Subject: [PATCH] Fixed id not being string --- deemix/__init__.py | 2 +- deemix/app/queuemanager.py | 4 ++-- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deemix/__init__.py b/deemix/__init__.py index c04b6b9..d8f1143 100644 --- a/deemix/__init__.py +++ b/deemix/__init__.py @@ -1,3 +1,3 @@ #!/usr/bin/env python3 -__version__ = "1.5.3" +__version__ = "1.5.4" diff --git a/deemix/app/queuemanager.py b/deemix/app/queuemanager.py index d4f5f2c..f7bcffc 100644 --- a/deemix/app/queuemanager.py +++ b/deemix/app/queuemanager.py @@ -22,7 +22,7 @@ class QueueManager: self.sp = spotifyHelper def generateTrackQueueItem(self, dz, id, settings, bitrate, trackAPI=None, albumAPI=None): - if id.startswith("isrc"): + if str(id).startswith("isrc"): try: trackAPI = dz.get_track(id) except APIError as e: @@ -77,7 +77,7 @@ class QueueManager: e = json.loads(str(e)) return QueueError("https://deezer.com/album/"+str(id), f"Wrong URL: {e['type']+': ' if 'type' in e else ''}{e['message'] if 'message' in e else ''}") - if id.startswith('upc'): + if str(id).startswith('upc'): id = albumAPI['id'] albumAPI_gw = dz.get_album_gw(id) albumAPI['nb_disk'] = albumAPI_gw['NUMBER_DISK'] diff --git a/setup.py b/setup.py index 8cf502d..8b1a9f3 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text() setup( name="deemix", - version="1.5.3", + version="1.5.4", description="A barebone deezer downloader library", long_description=README, long_description_content_type="text/markdown",