mirror of
https://github.com/Wojtek242/qobuz-dl.git
synced 2024-12-22 23:34:40 +01:00
Simplify params handling for endpoints
This commit is contained in:
parent
6aa3f5fb0f
commit
902c5b8ee2
@ -43,10 +43,6 @@ class Client:
|
||||
params = {"track_id": kwargs["id"]}
|
||||
elif epoint == "album/get":
|
||||
params = {"album_id": kwargs["id"]}
|
||||
elif epoint == "track/search":
|
||||
params = {"query": kwargs["query"], "limit": kwargs["limit"]}
|
||||
elif epoint == "album/search":
|
||||
params = {"query": kwargs["query"], "limit": kwargs["limit"]}
|
||||
elif epoint == "playlist/get":
|
||||
params = {
|
||||
"extra": "tracks",
|
||||
@ -94,6 +90,8 @@ class Client:
|
||||
"format_id": fmt_id,
|
||||
"intent": "stream",
|
||||
}
|
||||
else:
|
||||
params=kwargs
|
||||
r = self.session.get(self.base + epoint, params=params)
|
||||
# Do ref header.
|
||||
if epoint == "user/login":
|
||||
|
Loading…
Reference in New Issue
Block a user