From afad9d2933afb892ede40841786dafdce1d3b213 Mon Sep 17 00:00:00 2001 From: hibby50 Date: Thu, 9 Dec 2021 08:01:26 -0500 Subject: [PATCH] Respect the authuser defined in headers_json when uploading a song --- ytmusicapi/mixins/uploads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ytmusicapi/mixins/uploads.py b/ytmusicapi/mixins/uploads.py index 835061c..dc43999 100644 --- a/ytmusicapi/mixins/uploads.py +++ b/ytmusicapi/mixins/uploads.py @@ -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)