From b8d0289cb7fd1532074c5822dbcad1ea0ed6c477 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 12 May 2015 17:08:39 -0500 Subject: [PATCH] Add watchdog timestamp for while loops If server was offline or access was restricted, would create false positives. --- service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service.py b/service.py index 60d66b4f..cff38680 100644 --- a/service.py +++ b/service.py @@ -151,7 +151,10 @@ class Service(): self.warn_auth = False while user.HasAccess == False: + + WINDOW.setProperty("Emby_Service_Timestamp", str(int(time.time()))) user.hasAccess() + if self.KodiMonitor.waitForAbort(5): # Abort was requested while waiting. We should exit break @@ -160,6 +163,7 @@ class Service(): else: # Wait until server becomes online or shut down is requested while not self.KodiMonitor.abortRequested(): + WINDOW.setProperty("Emby_Service_Timestamp", str(int(time.time()))) if user.getServer() == "": pass