Skip to content

Commit

Permalink
Respect the authuser defined in headers_json when uploading a song
Browse files Browse the repository at this point in the history
  • Loading branch information
hibby50 committed Dec 9, 2021
1 parent 55c795a commit afad9d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ytmusicapi/mixins/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def upload_song(self, filepath: str) -> Union[str, requests.Response]:
+ ', '.join(supported_filetypes))

headers = self.headers.copy()
upload_url = "https://upload.youtube.com/upload/usermusic/http?authuser=0"
upload_url = "https://upload.youtube.com/upload/usermusic/http?authuser=%s" % headers['X-Goog-AuthUser']
filesize = os.path.getsize(filepath)
body = ("filename=" + ntpath.basename(filepath)).encode('utf-8')
headers.pop('content-encoding', None)
Expand Down

0 comments on commit afad9d2

Please sign in to comment.