From c319a4a5cc6f7cf767f7eb48f5b465d3a7ee6b25 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Tue, 22 Dec 2020 16:22:45 -0800 Subject: [PATCH] Don't auto restart when updating Windows install --- plexpy/__init__.py | 3 +++ plexpy/versioncheck.py | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plexpy/__init__.py b/plexpy/__init__.py index d5ba9319..01f01988 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -2279,6 +2279,9 @@ def upgrade(): def shutdown(restart=False, update=False, checkout=False, reset=False): + if FROZEN and common.PLATFORM == 'Windows' and update: + restart = False + webstart.stop() # Shutdown the websocket connection diff --git a/plexpy/versioncheck.py b/plexpy/versioncheck.py index 572c5011..f372c258 100644 --- a/plexpy/versioncheck.py +++ b/plexpy/versioncheck.py @@ -277,12 +277,9 @@ def check_github(scheduler=False, notify=False, use_cache=False): if plexpy.PYTHON2: logger.warn('Tautulli is running using Python 2. Unable to run automatic update.') - elif scheduler and plexpy.FROZEN and common.PLATFORM == 'Windows': - logger.info('Running automatic update.') - plexpy.shutdown(update=True) - elif scheduler and plexpy.CONFIG.PLEXPY_AUTO_UPDATE and \ - not plexpy.DOCKER and not plexpy.SNAP and not plexpy.FROZEN: + not plexpy.DOCKER and not plexpy.SNAP and \ + not (plexpy.FROZEN and common.PLATFORM == 'Darwin'): logger.info('Running automatic update.') plexpy.shutdown(restart=True, update=True)