mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Only check browser notifications if enabled
This commit is contained in:
parent
a3a62b1d94
commit
600bca7e8b
4 changed files with 56 additions and 41 deletions
|
@ -2438,6 +2438,9 @@ class Browser(object):
|
|||
return True
|
||||
|
||||
def get_notifications(self):
|
||||
if not self.enabled:
|
||||
return
|
||||
|
||||
monitor_db = database.MonitorDatabase()
|
||||
result = monitor_db.select('SELECT subject_text, body_text FROM notify_log '
|
||||
'WHERE agent_id = 17 AND timestamp >= ? ',
|
||||
|
@ -2457,7 +2460,13 @@ class Browser(object):
|
|||
self.notify('PlexPy', 'Test Notification')
|
||||
|
||||
def return_config_options(self):
|
||||
config_option = [{'label': 'Allow Notifications',
|
||||
config_option = [{'label': 'Enable Browser Notifications',
|
||||
'value': self.enabled,
|
||||
'name': 'browser_enabled',
|
||||
'description': 'Enable to display desktop notifications from your browser.',
|
||||
'input_type': 'checkbox'
|
||||
},
|
||||
{'label': 'Allow Notifications',
|
||||
'value': 'Allow Notifications',
|
||||
'name': 'allow_browser',
|
||||
'description': 'Click to allow browser notifications. You must click this button for each browser.',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue