From 4d241fac484c39320ac594fa7bc98966e4e2aecc Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 14 Jun 2020 14:52:55 -0700 Subject: [PATCH] Try import rumps --- Tautulli.py | 2 +- plexpy/macos.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Tautulli.py b/Tautulli.py index 45a7902b..13e572ba 100755 --- a/Tautulli.py +++ b/Tautulli.py @@ -265,7 +265,7 @@ def main(): "module to enable the system tray icon.") 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 # Start the rest of Tautulli on a new thread threading.Thread(target=wait).start() diff --git a/plexpy/macos.py b/plexpy/macos.py index 55a46beb..934bfedc 100644 --- a/plexpy/macos.py +++ b/plexpy/macos.py @@ -19,7 +19,12 @@ import os import subprocess import sys import plistlib -import rumps + +try: + import rumps + has_rumps = True +except ImportError: + has_rumps = False import plexpy if plexpy.PYTHON2: