Fix verifying PMS with unpublished hostnames (Fixes Tautulli/Tautulli-Issues#190)

This commit is contained in:
JonnyWong16 2019-08-16 21:27:34 -07:00
parent a83108282a
commit 7b16af0585

View file

@ -3659,10 +3659,10 @@ class WebInterface(object):
identifier = server['clientIdentifier'] identifier = server['clientIdentifier']
break break
# Fallback to checking /identity endpoint is server is unpublished # Fallback to checking /identity endpoint if the server is unpublished
# Cannot set SSL settings on the PMS if unpublished so 'http' is okay # Cannot set SSL settings on the PMS if unpublished so 'http' is okay
if not identifier: if not identifier:
scheme = 'https' if ssl else 'http' scheme = 'https' if helpers.cast_to_int(ssl) else 'http'
url = '{scheme}://{hostname}:{port}'.format(scheme=scheme, hostname=hostname, port=port) url = '{scheme}://{hostname}:{port}'.format(scheme=scheme, hostname=hostname, port=port)
uri = '/identity' uri = '/identity'