Fix permanent header modification after uploads (closes #79)

This commit is contained in:
sigma67 2020-09-16 13:28:36 +02:00
commit 2d3219befd
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0

View file

@ -220,7 +220,7 @@ class UploadsMixin:
"The provided file type is not supported by YouTube Music. Supported file types are "
+ ', '.join(supported_filetypes))
headers = self.headers
headers = self.headers.copy()
upload_url = "https://upload.youtube.com/upload/usermusic/http?authuser=0"
filesize = os.path.getsize(filepath)
body = ("filename=" + ntpath.basename(filepath)).encode('utf-8')