Patch for providing your own auth header

This commit is contained in:
oitsjustjose 2025-09-20 14:26:01 -05:00
commit 99d8ee53ad

View file

@ -177,8 +177,11 @@ class YTMusicBase:
# Do not set custom headers when using OAUTH_CUSTOM_FULL
# Full headers are provided by the downstream client in this scenario.
elif self.auth_type == AuthType.OAUTH_CUSTOM_CLIENT:
headers["authorization"] = self._token.as_auth()
headers["X-Goog-Request-Time"] = str(int(time.time()))
# Only set the auth headers if they haven't already been -- hotfix for latest YTMusic API nonsense
if "authorizaton" not in headers:
headers["authorization"] = self._token.as_auth()
headers["X-Goog-Request-Time"] = str(int(time.time()))
return headers