继续修复媒体缺失问题

This commit is contained in:
景大侠
2025-03-30 02:38:50 +08:00
parent c5730cf1ad
commit 20b145c679
4 changed files with 9 additions and 5 deletions

View File

@@ -403,10 +403,14 @@ class Api:
)
else:
json_body = None
if params:
queries_unquoted = "&".join([f"{k}={v}" for k, v in params.items()])
else:
queries_unquoted = None
headers = {
"User-Agent": settings.USER_AGENT,
"Authorization": self._token,
"authx": self.__get_authx(api_path, json_body),
"authx": self.__get_authx(api_path, json_body or queries_unquoted),
}
if json_body is not None:
headers["Content-Type"] = "application/json"
@@ -425,4 +429,4 @@ class Api:
logger.error(f"请求接口 {api_path} 失败")
except Exception as e:
logger.error(f"请求接口 {api_path} 异常:" + str(e))
return None
return None