diff --git a/rip/core.py b/rip/core.py index cf311dc..2ea4f6a 100644 --- a/rip/core.py +++ b/rip/core.py @@ -368,7 +368,7 @@ class RipCore(list): if client.source == "deezer" and creds["arl"] == "": if self.config.session["deezer"]["deezloader_warnings"]: secho( - "Falling back to Deezloader (max 320kbps MP3). If you have a subscription, run ", + "Falling back to Deezloader (unstable). If you have a subscription, run ", nl=False, fg="yellow", ) diff --git a/streamrip/clients.py b/streamrip/clients.py index 8917005..1767e72 100644 --- a/streamrip/clients.py +++ b/streamrip/clients.py @@ -614,7 +614,7 @@ class DeezloaderClient(Client): """DeezloaderClient.""" source = "deezer" - max_quality = 1 + max_quality = 2 def __init__(self): """Create a DeezloaderClient.""" @@ -671,7 +671,7 @@ class DeezloaderClient(Client): return item @staticmethod - def get_file_url(meta_id: Union[str, int], quality: int = 6): + def get_file_url(meta_id: Union[str, int], quality: int = 2): """Get downloadable url for a track. :param meta_id: The track ID. @@ -679,8 +679,8 @@ class DeezloaderClient(Client): :param quality: :type quality: int """ - quality = min(DEEZER_MAX_Q, quality) - url = f"{DEEZER_DL}/{get_quality(quality, 'deezer')}/{DEEZER_BASE}/track/{meta_id}" + quality = min(DeezloaderClient.max_quality, quality) + url = f"{DEEZER_DL}/{get_quality(quality, 'deezloader')}/{DEEZER_BASE}/track/{meta_id}" logger.debug(f"Download url {url}") return {"url": url} diff --git a/streamrip/utils.py b/streamrip/utils.py index 82ebd40..2a769e8 100644 --- a/streamrip/utils.py +++ b/streamrip/utils.py @@ -180,6 +180,11 @@ __QUALITY_MAP: Dict[str, Dict[int, Union[int, str, Tuple[int, str]]]] = { 2: "LOSSLESS", # CD Quality 3: "HI_RES", # MQA }, + "deezloader": { + 0: 128, + 1: 320, + 2: 1411, + }, }