Fix OAUTH_CUSTOM_FULL mode (#527)

* Fix OAUTH_CUSTOM_FULL mode

* Fix OAUTH_CUSTOM_FULL mode
This commit is contained in:
Marvin Schenkel 2024-01-21 18:42:56 +01:00 • committed by sigma67
commit 8831090796
No known key found for this signature in database
GPG key ID: 1C314227DF0103D0

View file

@ -212,7 +212,9 @@ class YTMusicBase:
if self.auth_type == AuthType.BROWSER:
self._headers["authorization"] = get_authorization(self.sapisid + " " + self.origin)
elif self.auth_type in AuthType.oauth_types():
# 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 in [x for x in AuthType.oauth_types() if x != AuthType.OAUTH_CUSTOM_FULL]:
self._headers["authorization"] = self._token.as_auth()
self._headers["X-Goog-Request-Time"] = str(int(time.time()))