mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Don't show OSX Notification agent if we cannot use it.
This commit is contained in:
parent
881b25a8d4
commit
fc76ad656c
1 changed files with 13 additions and 9 deletions
|
@ -124,15 +124,6 @@ def available_notification_agents():
|
||||||
'on_stop': plexpy.CONFIG.PUSHOVER_ON_STOP,
|
'on_stop': plexpy.CONFIG.PUSHOVER_ON_STOP,
|
||||||
'on_watched': plexpy.CONFIG.PUSHOVER_ON_WATCHED
|
'on_watched': plexpy.CONFIG.PUSHOVER_ON_WATCHED
|
||||||
},
|
},
|
||||||
{'name': 'OSX Notify',
|
|
||||||
'id': AGENT_IDS['OSX Notify'],
|
|
||||||
'config_prefix': 'osx_notify',
|
|
||||||
'has_config': True,
|
|
||||||
'state': checked(plexpy.CONFIG.OSX_NOTIFY_ENABLED),
|
|
||||||
'on_play': plexpy.CONFIG.OSX_NOTIFY_ON_PLAY,
|
|
||||||
'on_stop': plexpy.CONFIG.OSX_NOTIFY_ON_STOP,
|
|
||||||
'on_watched': plexpy.CONFIG.OSX_NOTIFY_ON_WATCHED
|
|
||||||
},
|
|
||||||
{'name': 'Boxcar2',
|
{'name': 'Boxcar2',
|
||||||
'id': AGENT_IDS['Boxcar2'],
|
'id': AGENT_IDS['Boxcar2'],
|
||||||
'config_prefix': 'boxcar',
|
'config_prefix': 'boxcar',
|
||||||
|
@ -153,6 +144,19 @@ def available_notification_agents():
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# OSX Notifications should only be visible if it can be used
|
||||||
|
osx_notify = OSX_NOTIFY()
|
||||||
|
if osx_notify:
|
||||||
|
agents.append({'name': 'OSX Notify',
|
||||||
|
'id': AGENT_IDS['OSX Notify'],
|
||||||
|
'config_prefix': 'osx_notify',
|
||||||
|
'has_config': True,
|
||||||
|
'state': checked(plexpy.CONFIG.OSX_NOTIFY_ENABLED),
|
||||||
|
'on_play': plexpy.CONFIG.OSX_NOTIFY_ON_PLAY,
|
||||||
|
'on_stop': plexpy.CONFIG.OSX_NOTIFY_ON_STOP,
|
||||||
|
'on_watched': plexpy.CONFIG.OSX_NOTIFY_ON_WATCHED
|
||||||
|
})
|
||||||
|
|
||||||
return agents
|
return agents
|
||||||
|
|
||||||
def get_notification_agent_config(config_id):
|
def get_notification_agent_config(config_id):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue