mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 05:01:14 -07:00
Try import rumps
This commit is contained in:
parent
4390f5cbc8
commit
4d241fac48
2 changed files with 7 additions and 2 deletions
|
@ -265,7 +265,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 plexpy.CONFIG.SYS_TRAY_ICON:
|
if plexpy.CONFIG.SYS_TRAY_ICON and macos.has_rumps:
|
||||||
# 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()
|
||||||
|
|
|
@ -19,7 +19,12 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import plistlib
|
import plistlib
|
||||||
import rumps
|
|
||||||
|
try:
|
||||||
|
import rumps
|
||||||
|
has_rumps = True
|
||||||
|
except ImportError:
|
||||||
|
has_rumps = False
|
||||||
|
|
||||||
import plexpy
|
import plexpy
|
||||||
if plexpy.PYTHON2:
|
if plexpy.PYTHON2:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue