mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Show missing pyobjc module message on MacOS menu bar setting
This commit is contained in:
parent
451feda86b
commit
89307dad01
4 changed files with 19 additions and 12 deletions
|
@ -257,15 +257,12 @@ def main():
|
|||
plexpy.HTTP_ROOT)
|
||||
|
||||
if common.PLATFORM == 'Darwin' and plexpy.CONFIG.SYS_TRAY_ICON:
|
||||
try:
|
||||
import AppKit
|
||||
import Foundation
|
||||
except ImportError:
|
||||
if not macos.HAS_PYOBJC:
|
||||
logger.warn("The pyobjc module is missing. Install this "
|
||||
"module to enable the menu bar icon.")
|
||||
"module to enable the MacOS menu bar icon.")
|
||||
plexpy.CONFIG.SYS_TRAY_ICON = False
|
||||
|
||||
if plexpy.CONFIG.SYS_TRAY_ICON and macos.has_rumps:
|
||||
if plexpy.CONFIG.SYS_TRAY_ICON:
|
||||
# MacOS menu bar 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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue