Fix only MacOS system tray icon on Mac
This commit is contained in:
@@ -256,6 +256,7 @@ def main():
|
|||||||
plexpy.launch_browser(plexpy.CONFIG.HTTP_HOST, plexpy.HTTP_PORT,
|
plexpy.launch_browser(plexpy.CONFIG.HTTP_HOST, plexpy.HTTP_PORT,
|
||||||
plexpy.HTTP_ROOT)
|
plexpy.HTTP_ROOT)
|
||||||
|
|
||||||
|
if common.PLATFORM == 'Darwin' and plexpy.CONFIG.SYS_TRAY_ICON:
|
||||||
try:
|
try:
|
||||||
import AppKit
|
import AppKit
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@@ -263,7 +264,7 @@ def main():
|
|||||||
"module to enable the system tray icon.")
|
"module to enable the system tray icon.")
|
||||||
plexpy.CONFIG.SYS_TRAY_ICON = False
|
plexpy.CONFIG.SYS_TRAY_ICON = False
|
||||||
|
|
||||||
if common.PLATFORM == 'Darwin' and plexpy.CONFIG.SYS_TRAY_ICON:
|
if plexpy.CONFIG.SYS_TRAY_ICON:
|
||||||
# MacOS system tray icon must be run on the main thread and is blocking
|
# MacOS system tray icon must be run on the main thread and is blocking
|
||||||
# Start the rest of Tautulli on a new thread
|
# Start the rest of Tautulli on a new thread
|
||||||
threading.Thread(target=wait).start()
|
threading.Thread(target=wait).start()
|
||||||
@@ -271,6 +272,8 @@ def main():
|
|||||||
plexpy.MAC_SYS_TRAY_ICON.start()
|
plexpy.MAC_SYS_TRAY_ICON.start()
|
||||||
else:
|
else:
|
||||||
wait()
|
wait()
|
||||||
|
else:
|
||||||
|
wait()
|
||||||
|
|
||||||
|
|
||||||
def wait():
|
def wait():
|
||||||
|
Reference in New Issue
Block a user