Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b3e090b4c | |||
| 049beb9526 |
@@ -1,5 +1,5 @@
|
|||||||
# qobuz-dl
|
# qobuz-dl
|
||||||
Search, explore and download Lossless and Hi-Res music from [Qobuz](https://www.qobuz.com/). It *just works*™ (2025).
|
Search, explore and download Lossless and Hi-Res music from [Qobuz](https://www.qobuz.com/).
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VZWSWVGZGJRMU&source=url)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VZWSWVGZGJRMU&source=url)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from .qopy import Client
|
from .qopy import Client
|
||||||
from .cli import main
|
from .cli import main
|
||||||
|
|||||||
@@ -254,8 +254,8 @@ class Download:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_track_attr(meta, track_title, bit_depth, sampling_rate):
|
def _get_track_attr(meta, track_title, bit_depth, sampling_rate):
|
||||||
return {
|
return {
|
||||||
"album": sanitize_filename(meta["album"]["title"]),
|
"album": meta["album"]["title"],
|
||||||
"artist": sanitize_filename(meta["album"]["artist"]["name"]),
|
"artist": meta["album"]["artist"]["name"],
|
||||||
"tracktitle": track_title,
|
"tracktitle": track_title,
|
||||||
"year": meta["album"]["release_date_original"].split("-")[0],
|
"year": meta["album"]["release_date_original"].split("-")[0],
|
||||||
"bit_depth": bit_depth,
|
"bit_depth": bit_depth,
|
||||||
@@ -265,8 +265,8 @@ class Download:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_album_attr(meta, album_title, file_format, bit_depth, sampling_rate):
|
def _get_album_attr(meta, album_title, file_format, bit_depth, sampling_rate):
|
||||||
return {
|
return {
|
||||||
"artist": sanitize_filename(meta["artist"]["name"]),
|
"artist": meta["artist"]["name"],
|
||||||
"album": sanitize_filename(album_title),
|
"album": album_title,
|
||||||
"year": meta["release_date_original"].split("-")[0],
|
"year": meta["release_date_original"].split("-")[0],
|
||||||
"format": file_format,
|
"format": file_format,
|
||||||
"bit_depth": bit_depth,
|
"bit_depth": bit_depth,
|
||||||
|
|||||||
+3
-1
@@ -3,6 +3,7 @@
|
|||||||
# original author.
|
# original author.
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@@ -120,7 +121,8 @@ class Client:
|
|||||||
raise InvalidAppSecretError(f"Invalid app secret: {r.json()}.\n" + RESET)
|
raise InvalidAppSecretError(f"Invalid app secret: {r.json()}.\n" + RESET)
|
||||||
|
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
return r.json()
|
return json.loads(r.text.encode("utf-8", errors="ignore"))
|
||||||
|
# return r.json()
|
||||||
|
|
||||||
def auth(self, email, pwd):
|
def auth(self, email, pwd):
|
||||||
usr_info = self.api_call("user/login", email=email, pwd=pwd)
|
usr_info = self.api_call("user/login", email=email, pwd=pwd)
|
||||||
|
|||||||
Reference in New Issue
Block a user