From 67fcb7d37f0cd24564b7ff2738cd5e69551edc6d Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 11 Feb 2021 12:31:30 +0100 Subject: [PATCH] Fixed Spotify URL parsing and version bump to 2.0.16 --- deemix/__init__.py | 2 +- deemix/utils/__init__.py | 1 + setup.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deemix/__init__.py b/deemix/__init__.py index 8adfab8..de69d03 100644 --- a/deemix/__init__.py +++ b/deemix/__init__.py @@ -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" diff --git a/deemix/utils/__init__.py b/deemix/utils/__init__.py index 44a6f26..5936119 100644 --- a/deemix/utils/__init__.py +++ b/deemix/utils/__init__.py @@ -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": diff --git a/setup.py b/setup.py index 1eb0187..f14b4e9 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text() setup( name="deemix", - version="2.0.15", + version="2.0.16", description="A barebone deezer downloader library", long_description=README, long_description_content_type="text/markdown",