Skip to content

Commit

Permalink
wrap headers in str() to fix mismatched type error on download (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmarinsoto authored Sep 1, 2024
1 parent 4c98dbd commit e2e524e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions streamrip/client/qobuz.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,20 @@ async def login(self):
f.qobuz.secrets = c.secrets
f.set_modified()

self.session.headers.update({"X-App-Id": c.app_id})
self.session.headers.update({"X-App-Id": str(c.app_id)})
self.secret = await self._get_valid_secret(c.secrets)

if c.use_auth_token:
params = {
"user_id": c.email_or_userid,
"user_auth_token": c.password_or_token,
"app_id": c.app_id,
"app_id": str(c.app_id),
}
else:
params = {
"email": c.email_or_userid,
"password": c.password_or_token,
"app_id": c.app_id,
"app_id": str(c.app_id),
}

logger.debug("Request params %s", params)
Expand Down Expand Up @@ -203,7 +203,7 @@ async def get_metadata(self, item: str, media_type: str):

c = self.config.session.qobuz
params = {
"app_id": c.app_id,
"app_id": str(c.app_id),
f"{media_type}_id": item,
# Do these matter?
"limit": 500,
Expand Down Expand Up @@ -236,7 +236,7 @@ async def get_label(self, label_id: str) -> dict:
c = self.config.session.qobuz
page_limit = 500
params = {
"app_id": c.app_id,
"app_id": str(c.app_id),
"label_id": label_id,
"limit": page_limit,
"offset": 0,
Expand All @@ -254,7 +254,7 @@ async def get_label(self, label_id: str) -> dict:
self._api_request(
epoint,
{
"app_id": c.app_id,
"app_id": str(c.app_id),
"label_id": label_id,
"limit": page_limit,
"offset": offset,
Expand Down

0 comments on commit e2e524e

Please sign in to comment.