fix: unify User-Agent header usage with settings.USER_AGENT

This commit is contained in:
jxxghp
2026-05-30 09:49:29 +08:00
parent cce72d0884
commit 492e3c333b
3 changed files with 8 additions and 7 deletions

View File

@@ -223,7 +223,7 @@ def _release_sort_key(tag: str) -> tuple[int, ...]:
def _github_api_json(url: str, *, repo: str) -> Any:
headers = {
"Accept": "application/vnd.github+json",
"User-Agent": "MoviePilot-CLI",
"User-Agent": settings.USER_AGENT,
}
headers.update(settings.REPO_GITHUB_HEADERS(repo))
opener = build_opener(ProxyHandler(settings.PROXY or {}))