Added support for link.tospotify.com; add warns for not supported links

Updated PyPi to 1.5.20
This commit is contained in:
RemixDev 2020-11-10 13:57:03 +01:00
parent d6a18749c0
commit 13f6eab172
No known key found for this signature in database
GPG Key ID: B33962B465BDB51C
3 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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:

View File

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