2 Commits

Author SHA1 Message Date
Vitiko 6b3e090b4c Add encoding declaration 2023-06-24 03:22:01 -04:00
Vitiko 049beb9526 Use .content instead of .json() 2023-06-24 03:18:00 -04:00
4 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# 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/).
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VZWSWVGZGJRMU&source=url)
## Features
+2
View File
@@ -1,2 +1,4 @@
# -*- coding: utf-8 -*-
from .qopy import Client
from .cli import main
+4 -4
View File
@@ -254,8 +254,8 @@ class Download:
@staticmethod
def _get_track_attr(meta, track_title, bit_depth, sampling_rate):
return {
"album": sanitize_filename(meta["album"]["title"]),
"artist": sanitize_filename(meta["album"]["artist"]["name"]),
"album": meta["album"]["title"],
"artist": meta["album"]["artist"]["name"],
"tracktitle": track_title,
"year": meta["album"]["release_date_original"].split("-")[0],
"bit_depth": bit_depth,
@@ -265,8 +265,8 @@ class Download:
@staticmethod
def _get_album_attr(meta, album_title, file_format, bit_depth, sampling_rate):
return {
"artist": sanitize_filename(meta["artist"]["name"]),
"album": sanitize_filename(album_title),
"artist": meta["artist"]["name"],
"album": album_title,
"year": meta["release_date_original"].split("-")[0],
"format": file_format,
"bit_depth": bit_depth,
+3 -1
View File
@@ -3,6 +3,7 @@
# original author.
import hashlib
import json
import logging
import time
@@ -120,7 +121,8 @@ class Client:
raise InvalidAppSecretError(f"Invalid app secret: {r.json()}.\n" + RESET)
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):
usr_info = self.api_call("user/login", email=email, pwd=pwd)