From 45cdac891f66815bfb371aa25498e8785614f304 Mon Sep 17 00:00:00 2001 From: sigma67 Date: Sat, 18 Jul 2020 16:15:39 +0200 Subject: [PATCH] Don't reject user-provided headers (#46) --- ytmusicapi/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ytmusicapi/setup.py b/ytmusicapi/setup.py index 23a5f43..9935c82 100644 --- a/ytmusicapi/setup.py +++ b/ytmusicapi/setup.py @@ -42,9 +42,9 @@ def setup(filepath=None, headers_raw=None): with open(pkg_resources.resource_filename('ytmusicapi', 'headers.json')) as json_file: default_headers = json.load(json_file) - headers.update(default_headers) + default_headers.update(headers) if filepath is not None: with open(filepath, 'w') as file: - json.dump(headers, file, ensure_ascii=True, indent=4, sort_keys=True) + json.dump(default_headers, file, ensure_ascii=True, indent=4, sort_keys=True) - return json.dumps(headers) + return json.dumps(default_headers)