Fixed API parameter bad optimisation

This commit is contained in:
Abby Gourlay 2020-03-14 21:53:15 +00:00
parent 48ed8ad74c
commit a044c1fd29

View file

@ -370,12 +370,12 @@ class API(object):
"x-emby-authorization": auth "x-emby-authorization": auth
} }
def send_request(self, url, path, method="get", timeout=self.default_timeout, headers=self.get_default_headers(), data=None): def send_request(self, url, path, method="get", timeout=None, headers=None, data=None):
request_method = getattr(requests, method.lower()) request_method = getattr(requests, method.lower())
url = "%s/%s" % (url, path) url = "%s/%s" % (url, path)
request_settings = { request_settings = {
"timeout": timeout, "timeout": timeout or self.default_timeout,
"headers": headers, "headers": headers or self.get_default_headers(),
"data": data "data": data
} }