Allow for http type "OPTIONS"
This commit is contained in:
parent
4667e4ed64
commit
01f4833042
2 changed files with 14 additions and 1 deletions
|
@ -213,6 +213,8 @@ class DownloadUtils():
|
|||
r = s.post(url, json=postBody, timeout=timeout)
|
||||
elif type == "DELETE":
|
||||
r = s.delete(url, json=postBody, timeout=timeout)
|
||||
elif type == "OPTIONS":
|
||||
r = s.options(url, json=postBody, timeout=timeout)
|
||||
|
||||
except AttributeError:
|
||||
# request session does not exists
|
||||
|
@ -260,6 +262,14 @@ class DownloadUtils():
|
|||
cert=cert,
|
||||
verify=verifyssl)
|
||||
|
||||
elif type == "OPTIONS":
|
||||
r = requests.options(url,
|
||||
json=postBody,
|
||||
headers=header,
|
||||
timeout=timeout,
|
||||
cert=cert,
|
||||
verify=verifyssl)
|
||||
|
||||
# If user is not authenticated
|
||||
elif not authenticate:
|
||||
|
||||
|
|
|
@ -182,7 +182,10 @@ class InitialSetup():
|
|||
##### USER INFO #####
|
||||
|
||||
self.logMsg("Getting user list.", 1)
|
||||
|
||||
# If not multiple users, set username to Plex login name.
|
||||
# If multiple users, get user list.
|
||||
|
||||
|
||||
url = "%s/emby/Users/Public?format=json" % server
|
||||
result = self.doUtils.downloadUrl(url, authenticate=False)
|
||||
if result == "":
|
||||
|
|
Loading…
Reference in a new issue