From b54210480ff17e1294180a5fd8615d5b1bd92c1f Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Tue, 22 Dec 2020 19:06:42 -0800 Subject: [PATCH] Don't shutdown for Windows installer update --- plexpy/__init__.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/plexpy/__init__.py b/plexpy/__init__.py index 01f01988..a2168866 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -2278,9 +2278,11 @@ def upgrade(): return -def shutdown(restart=False, update=False, checkout=False, reset=False): +def shutdown(restart=False, update=False, checkout=False, reset=False, + _shutdown=True): if FROZEN and common.PLATFORM == 'Windows' and update: restart = False + _shutdown = False webstart.stop() @@ -2354,14 +2356,15 @@ def shutdown(restart=False, update=False, checkout=False, reset=False): else: logger.info("Tautulli is shutting down...") - logger.shutdown() + if _shutdown: + logger.shutdown() - if WIN_SYS_TRAY_ICON: - WIN_SYS_TRAY_ICON.shutdown() - elif MAC_SYS_TRAY_ICON: - MAC_SYS_TRAY_ICON.shutdown() + if WIN_SYS_TRAY_ICON: + WIN_SYS_TRAY_ICON.shutdown() + elif MAC_SYS_TRAY_ICON: + MAC_SYS_TRAY_ICON.shutdown() - os._exit(0) + os._exit(0) def generate_uuid():