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 #!/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): def generateQueueItem(self, dz, url, settings, bitrate=None, interface=None):
bitrate = getBitrateInt(bitrate) or settings['maxBitrate'] bitrate = getBitrateInt(bitrate) or settings['maxBitrate']
if 'deezer.page.link' in url: url = urlopen(url).url if 'deezer.page.link' in url: url = urlopen(url).url
if 'link.tospotify.com' in url: url = urlopen(url).url
type = getTypeFromLink(url) type = getTypeFromLink(url)
id = getIDFromLink(url, type) id = getIDFromLink(url, type)
@ -344,7 +345,6 @@ class QueueManager:
return QueueError(url, "Wrong URL: "+e.msg[e.msg.find('\n')+2:]) return QueueError(url, "Wrong URL: "+e.msg[e.msg.find('\n')+2:])
except Exception as e: except Exception as e:
return QueueError(url, "Something went wrong: "+str(e)) return QueueError(url, "Something went wrong: "+str(e))
else:
logger.warn("URL not supported yet") logger.warn("URL not supported yet")
return QueueError(url, "URL not supported yet", "unsupportedURL") return QueueError(url, "URL not supported yet", "unsupportedURL")

View file

@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
setup( setup(
name="deemix", name="deemix",
version="1.5.19", version="1.5.20",
description="A barebone deezer downloader library", description="A barebone deezer downloader library",
long_description=README, long_description=README,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",