mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 01:32:57 -07:00
Add include subject line for Pushover
This commit is contained in:
parent
8eed14ff3b
commit
a81ad27d85
1 changed files with 10 additions and 1 deletions
|
@ -2686,6 +2686,7 @@ class PUSHOVER(Notifier):
|
||||||
'priority': 0,
|
'priority': 0,
|
||||||
'sound': '',
|
'sound': '',
|
||||||
'incl_url': 1,
|
'incl_url': 1,
|
||||||
|
'incl_subject': 1,
|
||||||
'incl_poster': 0,
|
'incl_poster': 0,
|
||||||
'movie_provider': '',
|
'movie_provider': '',
|
||||||
'tv_provider': '',
|
'tv_provider': '',
|
||||||
|
@ -2695,13 +2696,15 @@ class PUSHOVER(Notifier):
|
||||||
def agent_notify(self, subject='', body='', action='', **kwargs):
|
def agent_notify(self, subject='', body='', action='', **kwargs):
|
||||||
data = {'token': self.config['api_token'],
|
data = {'token': self.config['api_token'],
|
||||||
'user': self.config['key'],
|
'user': self.config['key'],
|
||||||
'title': subject.encode("utf-8"),
|
|
||||||
'message': body.encode("utf-8"),
|
'message': body.encode("utf-8"),
|
||||||
'sound': self.config['sound'],
|
'sound': self.config['sound'],
|
||||||
'html': self.config['html_support'],
|
'html': self.config['html_support'],
|
||||||
'priority': self.config['priority'],
|
'priority': self.config['priority'],
|
||||||
'timestamp': int(time.time())}
|
'timestamp': int(time.time())}
|
||||||
|
|
||||||
|
if self.config['incl_subject']:
|
||||||
|
data['title'] = subject.encode("utf-8")
|
||||||
|
|
||||||
headers = {'Content-type': 'application/x-www-form-urlencoded'}
|
headers = {'Content-type': 'application/x-www-form-urlencoded'}
|
||||||
|
|
||||||
files = {}
|
files = {}
|
||||||
|
@ -2802,6 +2805,12 @@ class PUSHOVER(Notifier):
|
||||||
'description': 'Include a supplementary URL with the notifications.',
|
'description': 'Include a supplementary URL with the notifications.',
|
||||||
'input_type': 'checkbox'
|
'input_type': 'checkbox'
|
||||||
},
|
},
|
||||||
|
{'label': 'Include Subject Line',
|
||||||
|
'value': self.config['incl_subject'],
|
||||||
|
'name': 'pushover_incl_subject',
|
||||||
|
'description': 'Include the subject line with the notifications.',
|
||||||
|
'input_type': 'checkbox'
|
||||||
|
},
|
||||||
{'label': 'Include Poster Image',
|
{'label': 'Include Poster Image',
|
||||||
'value': self.config['incl_poster'],
|
'value': self.config['incl_poster'],
|
||||||
'name': 'pushover_incl_poster',
|
'name': 'pushover_incl_poster',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue