From 83598ff3f1232fee331d0b0efc0b555e66f434a5 Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 21 Feb 2020 08:40:41 +0100 Subject: [PATCH] Fix PKC auto-connecting to a local PMS --- resources/lib/initialsetup.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/resources/lib/initialsetup.py b/resources/lib/initialsetup.py index 809300b6..b8536dec 100644 --- a/resources/lib/initialsetup.py +++ b/resources/lib/initialsetup.py @@ -241,20 +241,18 @@ class InitialSetup(object): """ Checks for server's connectivity. Returns check_connection result """ - # Re-direct via plex if remote - will lead to the correct SSL - # certificate if server['local']: - url = ('%s://%s:%s' - % (server['scheme'], server['ip'], server['port'])) # Deactive SSL verification if the server is local for Kodi 17 verifySSL = True if v.KODIVERSION >= 18 else False else: - url = server['baseURL'] verifySSL = True - chk = PF.check_connection(url, - token=server['token'], - verifySSL=verifySSL) - return chk + if not server['token']: + # Plex GDM: we only get the token from plex.tv after + # Sign-in to plex.tv + server['token'] = utils.settings('plexToken') or None + return PF.check_connection(server['baseURL'], + token=server['token'], + verifySSL=verifySSL) def pick_pms(self, showDialog=False, inform_of_search=False): """