From 8831090796fc7af4411021c3beeae9642897d552 Mon Sep 17 00:00:00 2001 From: Marvin Schenkel Date: Sun, 21 Jan 2024 18:42:56 +0100 Subject: [PATCH] Fix OAUTH_CUSTOM_FULL mode (#527) * Fix OAUTH_CUSTOM_FULL mode * Fix OAUTH_CUSTOM_FULL mode --- ytmusicapi/ytmusic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ytmusicapi/ytmusic.py b/ytmusicapi/ytmusic.py index 96961fd..3d97103 100644 --- a/ytmusicapi/ytmusic.py +++ b/ytmusicapi/ytmusic.py @@ -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()))