Fixed id not being string

This commit is contained in:
RemixDev 2020-09-30 16:19:14 +02:00
parent 0d0fc9a2b7
commit 050b25471f
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -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']

View File

@ -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",