From a96451654c6eb343c80190b6d5a323191df63c73 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Mon, 7 Sep 2020 12:25:00 +0200 Subject: [PATCH] Added support for 'deezer.page.link' urls --- deemix/__init__.py | 2 +- deemix/app/queuemanager.py | 3 +++ setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/deemix/__init__.py b/deemix/__init__.py index f6b9ce3..aaa3c05 100644 --- a/deemix/__init__.py +++ b/deemix/__init__.py @@ -1,3 +1,3 @@ #!/usr/bin/env python3 -__version__ = "1.2.17" +__version__ = "1.2.18" diff --git a/deemix/app/queuemanager.py b/deemix/app/queuemanager.py index b9a48cf..ccf3753 100644 --- a/deemix/app/queuemanager.py +++ b/deemix/app/queuemanager.py @@ -9,6 +9,7 @@ import os.path as path import json from os import remove from time import sleep +from urllib.request import urlopen logging.basicConfig(level=logging.INFO) logger = logging.getLogger('deemix') @@ -23,6 +24,8 @@ class QueueManager: def generateQueueItem(self, dz, sp, url, settings, bitrate=None, albumAPI=None, interface=None): forcedBitrate = getBitrateInt(bitrate) bitrate = forcedBitrate if forcedBitrate else settings['maxBitrate'] + if 'deezer.page.link' in url: + url = urlopen(url).url type = getTypeFromLink(url) id = getIDFromLink(url, type) diff --git a/setup.py b/setup.py index 013bce4..47d19ca 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text() setup( name="deemix", - version="1.2.17", + version="1.2.18", description="A barebone deezer downloader library", long_description=README, long_description_content_type="text/markdown",