Skip to content

Commit

Permalink
Fix OAUTH_CUSTOM_FULL mode (#527)
Browse files Browse the repository at this point in the history
* Fix OAUTH_CUSTOM_FULL mode

* Fix OAUTH_CUSTOM_FULL mode
  • Loading branch information
MarvinSchenkel authored and sigma67 committed Jan 21, 2024
1 parent bb7a51e commit 8831090
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ytmusicapi/ytmusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ def headers(self):
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()))

Expand Down

0 comments on commit 8831090

Please sign in to comment.