Skip to content

Commit

Permalink
Fix OAUTH_CUSTOM_FULL mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinSchenkel committed Jan 20, 2024
1 parent a7f2827 commit 56b4688
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ytmusicapi/ytmusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ def headers(self):
if self.auth_type == AuthType.BROWSER:
self._headers["authorization"] = get_authorization(self.sapisid + " " + self.origin)

# Override the headers with the auth / input_dict when using OAUTH_CUSTOM_FULL
# Full headers are provided by the downstream client in this scenario.
elif self.auth_type == AuthType.OAUTH_CUSTOM_FULL:
self._headers = self._input_dict

elif self.auth_type in AuthType.oauth_types():
self._headers["authorization"] = self._token.as_auth()
self._headers["X-Goog-Request-Time"] = str(int(time.time()))
Expand Down

0 comments on commit 56b4688

Please sign in to comment.