mirror of
https://github.com/Wojtek242/qobuz-dl.git
synced 2024-11-22 11:05:25 +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"]}
|
params = {"track_id": kwargs["id"]}
|
||||||
elif epoint == "album/get":
|
elif epoint == "album/get":
|
||||||
params = {"album_id": kwargs["id"]}
|
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":
|
elif epoint == "playlist/get":
|
||||||
params = {
|
params = {
|
||||||
"extra": "tracks",
|
"extra": "tracks",
|
||||||
@ -94,6 +90,8 @@ class Client:
|
|||||||
"format_id": fmt_id,
|
"format_id": fmt_id,
|
||||||
"intent": "stream",
|
"intent": "stream",
|
||||||
}
|
}
|
||||||
|
else:
|
||||||
|
params=kwargs
|
||||||
r = self.session.get(self.base + epoint, params=params)
|
r = self.session.get(self.base + epoint, params=params)
|
||||||
# Do ref header.
|
# Do ref header.
|
||||||
if epoint == "user/login":
|
if epoint == "user/login":
|
||||||
|
Loading…
Reference in New Issue
Block a user