From 7b16af05850d8e57bb73969ceb053702e4a530c5 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 16 Aug 2019 21:27:34 -0700 Subject: [PATCH] Fix verifying PMS with unpublished hostnames (Fixes Tautulli/Tautulli-Issues#190) --- plexpy/webserve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 937ea232..7e468a2c 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -3659,10 +3659,10 @@ class WebInterface(object): identifier = server['clientIdentifier'] 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 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) uri = '/identity'