Patch for providing your own auth header
This commit is contained in:
parent
43971eb7d5
commit
99d8ee53ad
1 changed files with 5 additions and 2 deletions
|
|
@ -177,8 +177,11 @@ class YTMusicBase:
|
||||||
# Do not set custom headers when using OAUTH_CUSTOM_FULL
|
# Do not set custom headers when using OAUTH_CUSTOM_FULL
|
||||||
# Full headers are provided by the downstream client in this scenario.
|
# Full headers are provided by the downstream client in this scenario.
|
||||||
elif self.auth_type == AuthType.OAUTH_CUSTOM_CLIENT:
|
elif self.auth_type == AuthType.OAUTH_CUSTOM_CLIENT:
|
||||||
headers["authorization"] = self._token.as_auth()
|
# Only set the auth headers if they haven't already been -- hotfix for latest YTMusic API nonsense
|
||||||
headers["X-Goog-Request-Time"] = str(int(time.time()))
|
if "authorizaton" not in headers:
|
||||||
|
headers["authorization"] = self._token.as_auth()
|
||||||
|
headers["X-Goog-Request-Time"] = str(int(time.time()))
|
||||||
|
|
||||||
|
|
||||||
return headers
|
return headers
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue