From 7bb9c6c915c89e1b9c3c4aa07f0a119b47834c56 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 25 Apr 2020 12:08:14 -0700 Subject: [PATCH] Set Windows launch at startup --- Tautulli.py | 9 ++- data/interfaces/default/settings.html | 6 ++ plexpy/__init__.py | 50 ------------ plexpy/config.py | 1 + plexpy/webserve.py | 38 ++++++--- plexpy/windows.py | 110 ++++++++++++++++++++++++++ 6 files changed, 149 insertions(+), 65 deletions(-) create mode 100644 plexpy/windows.py diff --git a/Tautulli.py b/Tautulli.py index aa899189..b08b011b 100755 --- a/Tautulli.py +++ b/Tautulli.py @@ -36,7 +36,8 @@ import tzlocal import plexpy from plexpy import config, database, helpers, logger, webstart - +if os.name == 'nt': + from plexpy import windows # Register signals, such as CTRL + C signal.signal(signal.SIGINT, plexpy.sig_handler) @@ -240,8 +241,10 @@ def main(): webstart.start() # Windows system tray icon - if os.name == 'nt' and plexpy.CONFIG.WIN_SYS_TRAY: - plexpy.win_system_tray() + if os.name == 'nt': + windows.set_startup() + if plexpy.CONFIG.WIN_SYS_TRAY: + windows.win_system_tray() logger.info("Tautulli is ready!") diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 20fe51a6..540f09d3 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -455,6 +455,12 @@

Show Tautulli shortcut in the system tray.

+
+ +

Start Tautulli automatically after Windows Login.

+
% endif