Add PMS http request timeout an advanced setting in config file

This commit is contained in:
JonnyWong16 2016-05-09 18:28:39 -07:00
parent a70817f421
commit 83b97111a0
2 changed files with 5 additions and 1 deletions

View file

@ -47,6 +47,7 @@ _CONFIG_DEFINITIONS = {
'PMS_URL': (str, 'PMS', ''),
'PMS_USE_BIF': (int, 'PMS', 0),
'PMS_UUID': (str, 'PMS', ''),
'PMS_TIMEOUT': (int, 'Advanced', 15),
'TIME_FORMAT': (str, 'General', 'HH:mm'),
'ANON_REDIRECT': (str, 'General', 'http://dereferer.org/?'),
'API_ENABLED': (int, 'General', 0),

View file

@ -48,7 +48,10 @@ class HTTPHandler(object):
output_format='raw',
return_type=False,
no_token=False,
timeout=20):
timeout=None):
if timeout is None:
timeout = plexpy.CONFIG.PMS_TIMEOUT
valid_request_types = ['GET', 'POST', 'PUT', 'DELETE']