Fixed Spotify URL parsing and version bump to 2.0.16
This commit is contained in:
parent
0814a17600
commit
67fcb7d37f
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
__version__ = "2.0.15"
|
||||
__version__ = "2.0.16"
|
||||
USER_AGENT_HEADER = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) " \
|
||||
"Chrome/79.0.3945.130 Safari/537.36"
|
||||
VARIOUS_ARTISTS = "5080"
|
||||
|
|
|
@ -69,6 +69,7 @@ def getIDFromLink(link, type):
|
|||
link = link[:-1]
|
||||
|
||||
if link.startswith("http") and 'open.spotify.com/' in link:
|
||||
if '&' in link: link = link[:link.find('&')]
|
||||
if type == "spotifyplaylist":
|
||||
return link[link.find("/playlist/") + 10:]
|
||||
if type == "spotifytrack":
|
||||
|
|
Loading…
Reference in New Issue