mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Actually set notifier config when sending notifications
This commit is contained in:
parent
f42d7b0da0
commit
44f39e7fea
3 changed files with 16 additions and 14 deletions
|
@ -381,7 +381,8 @@ def get_notifier_config(notifier_id=None):
|
|||
notifier_text[k] = {'subject': result.pop(k + '_subject'),
|
||||
'body': result.pop(k + '_body')}
|
||||
|
||||
result['config'] = notifier_config
|
||||
result['config'] = config
|
||||
result['config_options'] = notifier_config
|
||||
result['actions'] = notifier_actions
|
||||
result['notify_text'] = notifier_text
|
||||
|
||||
|
@ -478,7 +479,8 @@ def set_notifier_config(notifier_id=None, agent_id=None, **kwargs):
|
|||
def send_notification(notifier_id=None, subject='', body='', notify_action='', **kwargs):
|
||||
notifier_config = get_notifier_config(notifier_id=notifier_id)
|
||||
if notifier_config:
|
||||
agent = get_agent_class(notifier_config['agent_id'])
|
||||
agent = get_agent_class(agent_id=notifier_config['agent_id'],
|
||||
config=notifier_config['config'])
|
||||
return agent.notify(subject=subject,
|
||||
body=body,
|
||||
action=notify_action,
|
||||
|
|
|
@ -2897,6 +2897,11 @@ class WebInterface(object):
|
|||
"incl_subject": 1,
|
||||
"disable_web_preview": 0
|
||||
},
|
||||
"config_options": [{...}, ...]
|
||||
"actions": {"on_play": 0,
|
||||
"on_stop": 0,
|
||||
...
|
||||
},
|
||||
"notify_text": {"on_play": {"subject": "...",
|
||||
"body": "..."
|
||||
}
|
||||
|
@ -2904,12 +2909,7 @@ class WebInterface(object):
|
|||
"body": "..."
|
||||
}
|
||||
...
|
||||
},
|
||||
|
||||
"actions": {"on_play": 0,
|
||||
"on_stop": 0,
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue