mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2024-12-29 11:06:14 +00:00
Added support for link.tospotify.com; add warns for not supported links
Updated PyPi to 1.5.20
This commit is contained in:
parent
d6a18749c0
commit
13f6eab172
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
__version__ = "1.5.19"
|
__version__ = "1.5.20"
|
||||||
|
|
|
@ -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,9 +345,8 @@ 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")
|
|
||||||
|
|
||||||
def addToQueue(self, dz, url, settings, bitrate=None, interface=None, ack=None):
|
def addToQueue(self, dz, url, settings, bitrate=None, interface=None, ack=None):
|
||||||
if not dz.logged_in:
|
if not dz.logged_in:
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue