From 99d8ee53ad2e205262c195ab84250943036a8f21 Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Sat, 20 Sep 2025 14:26:01 -0500 Subject: [PATCH] Patch for providing your own auth header --- ytmusicapi/ytmusic.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ytmusicapi/ytmusic.py b/ytmusicapi/ytmusic.py index 33808a2..5bf6e9d 100644 --- a/ytmusicapi/ytmusic.py +++ b/ytmusicapi/ytmusic.py @@ -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