Rename sys_tray_icon setting

This commit is contained in:
JonnyWong16 2020-04-25 18:31:09 -07:00
parent d5373c3992
commit 00c9fc79f9
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 11 additions and 11 deletions

View file

@ -245,8 +245,9 @@ def main():
# Windows system tray icon
if common.PLATFORM == 'Windows':
if plexpy.CONFIG.WIN_SYS_TRAY:
if plexpy.CONFIG.SYS_TRAY_ICON:
plexpy.WIN_SYS_TRAY_ICON = windows.WindowsSystemTray()
plexpy.WIN_SYS_TRAY_ICON.start()
windows.set_startup()
elif common.PLATFORM == 'Darwin':
macos.set_startup()
@ -258,9 +259,10 @@ def main():
plexpy.launch_browser(plexpy.CONFIG.HTTP_HOST, plexpy.HTTP_PORT,
plexpy.HTTP_ROOT)
if common.PLATFORM == 'Darwin':
if common.PLATFORM == 'Darwin' and plexpy.CONFIG.SYS_TRAY_ICON:
threading.Thread(target=wait).start()
macos.MacOSSystemTray().start()
plexpy.MAC_SYS_TRAY_ICON = macos.MacOSSystemTray()
plexpy.MAC_SYS_TRAY_ICON.start()
else:
wait()

View file

@ -448,15 +448,13 @@
</div>
<p class="help-block">Note: Web interface changes require a restart.</p>
% if common.PLATFORM == 'Windows':
% if common.PLATFORM in ('Windows', 'Darwin'):
<div class="checkbox">
<label>
<input type="checkbox" class="http-settings" name="win_sys_tray" id="win_sys_tray" value="1" ${config['win_sys_tray']}> Enable System Tray Icon
<input type="checkbox" class="http-settings" name="sys_tray_icon" id="sys_tray_icon" value="1" ${config['sys_tray_icon']}> Enable System Tray Icon
</label>
<p class="help-block">Show Tautulli shortcut in the system tray.</p>
</div>
% endif
% if common.PLATFORM in ('Windows', 'Darwin'):
<div class="checkbox">
<label>
<input type="checkbox" name="launch_startup" id="launch_startup" value="1" ${config['launch_startup']}> Launch at System Startup

View file

@ -216,7 +216,7 @@
<input type="checkbox" name="first_run" id="first_run" value="1" checked>
<input type="checkbox" name="group_history_tables" id="group_history_tables" value="1" checked>
<input type="checkbox" name="history_table_activity" id="history_table_activity" value="1" checked>
<input type="checkbox" name="win_sys_tray" id="win_sys_tray" value="1" checked>
<input type="checkbox" name="sys_tray_icon" id="sys_tray_icon" value="1" checked>
<input type="checkbox" name="launch_startup" id="launch_startup" value="1" checked>
<input type="checkbox" name="launch_browser" id="launch_browser" value="1" checked>
<input type="checkbox" name="api_enabled" id="api_enabled" value="1" checked>

View file

@ -638,7 +638,7 @@ _CONFIG_DEFINITIONS = {
'JWT_SECRET': (str, 'Advanced', ''),
'JWT_UPDATE_SECRET': (bool_int, 'Advanced', 0),
'SYSTEM_ANALYTICS': (int, 'Advanced', 1),
'WIN_SYS_TRAY': (int, 'General', 1)
'SYS_TRAY': (int, 'General', 1),
}
_BLACKLIST_KEYS = ['_APITOKEN', '_TOKEN', '_KEY', '_SECRET', '_PASSWORD', '_APIKEY', '_ID', '_HOOK']

View file

@ -3038,7 +3038,7 @@ class WebInterface(object):
"newsletter_password": plexpy.CONFIG.NEWSLETTER_PASSWORD,
"newsletter_inline_styles": checked(plexpy.CONFIG.NEWSLETTER_INLINE_STYLES),
"newsletter_custom_dir": plexpy.CONFIG.NEWSLETTER_CUSTOM_DIR,
"win_sys_tray": checked(plexpy.CONFIG.WIN_SYS_TRAY)
"sys_tray_icon": checked(plexpy.CONFIG.SYS_TRAY_ICON)
}
return serve_template(templatename="settings.html", title="Settings", config=config, kwargs=kwargs)
@ -3074,7 +3074,7 @@ class WebInterface(object):
"allow_guest_access", "cache_images", "http_proxy", "http_basic_auth", "notify_concurrent_by_ip",
"history_table_activity", "plexpy_auto_update",
"themoviedb_lookup", "tvmaze_lookup", "musicbrainz_lookup", "http_plex_admin",
"newsletter_self_hosted", "newsletter_inline_styles", "win_sys_tray"
"newsletter_self_hosted", "newsletter_inline_styles", "sys_tray_icon"
]
for checked_config in checked_configs:
if checked_config not in kwargs: