From f3afa8dab163c1bee4158bc1478393cd9498e38d Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Tue, 31 May 2016 07:36:52 +0200 Subject: [PATCH] Ensure credentials are known when reconnecting - Re-Instantiate for every new connection attempt --- service.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/service.py b/service.py index fe448c94..3f21d3f6 100644 --- a/service.py +++ b/service.py @@ -127,8 +127,7 @@ class Service(): kodiProfile = xbmc.translatePath("special://profile") # Server auto-detect - setup = initialsetup.InitialSetup() - setup.setup() + initialsetup.InitialSetup().setup() # Queue for background sync queue = Queue.Queue(maxsize=200) @@ -245,7 +244,7 @@ class Service(): break xbmc.sleep(50) else: - # Wait until Emby server is online + # Wait until Plex server is online # or Kodi is shut down. while not monitor.abortRequested(): server = user.getServer() @@ -260,7 +259,6 @@ class Service(): window('emby_online', value="false") # Suspend threads window('suspend_LibraryThread', value='true') - xbmcgui.Dialog().notification( heading=lang(33001), message="%s %s" @@ -273,6 +271,7 @@ class Service(): # Periodically check if the IP changed, e.g. per minute if counter > 30: counter = 0 + setup = initialsetup.InitialSetup() tmp = setup.PickPMS() if tmp is not None: setup.WritePMStoSettings(tmp)