Respect the authuser defined in headers_json when uploading a song

This commit is contained in:
hibby50 2021-12-09 08:01:26 -05:00
commit afad9d2933

View file

@ -203,7 +203,7 @@ class UploadsMixin:
+ ', '.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)