diff --git a/plexpy/__init__.py b/plexpy/__init__.py index 8598bb7f..7e2d46f5 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -461,7 +461,8 @@ def start(): notification_handler.start_threads(num_threads=CONFIG.NOTIFICATION_THREADS) notifiers.check_browser_enabled() - activity_pinger.connect_server(log=True, startup=True) + if CONFIG.FIRST_RUN_COMPLETE: + activity_pinger.connect_server(log=True, startup=True) _STARTED = True diff --git a/plexpy/web_socket.py b/plexpy/web_socket.py index 71375aad..9a51384d 100644 --- a/plexpy/web_socket.py +++ b/plexpy/web_socket.py @@ -33,11 +33,10 @@ ws_reconnect = False def start_thread(): - if plexpy.CONFIG.FIRST_RUN_COMPLETE: - # Check for any existing sessions on start up - activity_pinger.check_active_sessions(ws_request=True) - # Start the websocket listener on it's own thread - threading.Thread(target=run).start() + # Check for any existing sessions on start up + activity_pinger.check_active_sessions(ws_request=True) + # Start the websocket listener on it's own thread + threading.Thread(target=run).start() def on_connect(): diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 1f73737a..de2bff8e 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2748,7 +2748,7 @@ class WebInterface(object): # If first run, start websocket if first_run: - activity_pinger.connect_server() + activity_pinger.connect_server(log=True, startup=True) # Reconfigure scheduler if intervals changed if reschedule: