From 13f6eab17231b99abe33ff37cd309545f01729a9 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Tue, 10 Nov 2020 13:57:03 +0100 Subject: [PATCH] Added support for link.tospotify.com; add warns for not supported links Updated PyPi to 1.5.20 --- deemix/__init__.py | 2 +- deemix/app/queuemanager.py | 6 +++--- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deemix/__init__.py b/deemix/__init__.py index 0dc2e61..92b60c9 100644 --- a/deemix/__init__.py +++ b/deemix/__init__.py @@ -1,3 +1,3 @@ #!/usr/bin/env python3 -__version__ = "1.5.19" +__version__ = "1.5.20" diff --git a/deemix/app/queuemanager.py b/deemix/app/queuemanager.py index fa82d98..aced55c 100644 --- a/deemix/app/queuemanager.py +++ b/deemix/app/queuemanager.py @@ -285,6 +285,7 @@ class QueueManager: def generateQueueItem(self, dz, url, settings, bitrate=None, interface=None): bitrate = getBitrateInt(bitrate) or settings['maxBitrate'] if 'deezer.page.link' in url: url = urlopen(url).url + if 'link.tospotify.com' in url: url = urlopen(url).url type = getTypeFromLink(url) id = getIDFromLink(url, type) @@ -344,9 +345,8 @@ class QueueManager: return QueueError(url, "Wrong URL: "+e.msg[e.msg.find('\n')+2:]) except Exception as e: return QueueError(url, "Something went wrong: "+str(e)) - else: - logger.warn("URL not supported yet") - return QueueError(url, "URL not supported yet", "unsupportedURL") + logger.warn("URL not supported yet") + return QueueError(url, "URL not supported yet", "unsupportedURL") def addToQueue(self, dz, url, settings, bitrate=None, interface=None, ack=None): if not dz.logged_in: diff --git a/setup.py b/setup.py index 9518d80..0bebf64 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text() setup( name="deemix", - version="1.5.19", + version="1.5.20", description="A barebone deezer downloader library", long_description=README, long_description_content_type="text/markdown",