mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Add notification for Plex external port down
This commit is contained in:
parent
ca91adbd53
commit
223e2b2b32
6 changed files with 142 additions and 56 deletions
|
@ -66,10 +66,17 @@ from plexpy import helpers
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_down" ${helpers.checked(data['on_down'])} class="toggle-switches">
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_extdown" ${helpers.checked(data['on_extdown'])} class="toggle-switches">
|
||||||
Notify on server down
|
Notify on Plex external port down
|
||||||
</label>
|
</label>
|
||||||
<p class="help-block">Trigger notification when the Plex Media Server cannot be reached.</p>
|
<p class="help-block">Trigger notification when the Plex Media Server cannot be reached externally.</p>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_intdown" ${helpers.checked(data['on_intdown'])} class="toggle-switches">
|
||||||
|
Notify on Plex server down
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Trigger notification when the Plex Media Server cannot be reached internally.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -538,7 +538,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
<br/>
|
<br/>
|
||||||
<ul id="accordion-session" class="accordion list-unstyled">
|
<ul id="accordion-session" class="accordion list-unstyled">
|
||||||
<li>
|
<li>
|
||||||
<div class="link"><i class="fa fa-play"></i>Playback Start<i class="fa fa-chevron-down"></i></div>
|
<div class="link"><i class="fa fa-play fa-fw"></i> Playback Start<i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -555,7 +555,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="link"><i class="fa fa-stop"></i>Playback Stop<i class="fa fa-chevron-down"></i></div>
|
<div class="link"><i class="fa fa-stop fa-fw"></i> Playback Stop<i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -572,7 +572,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="link"><i class="fa fa-pause"></i>Playback Pause<i class="fa fa-chevron-down"></i></div>
|
<div class="link"><i class="fa fa-pause fa-fw"></i> Playback Pause<i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -589,7 +589,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="link"><i class="fa fa-play"></i>Playback Resume<i class="fa fa-chevron-down"></i></div>
|
<div class="link"><i class="fa fa-play fa-fw"></i> Playback Resume<i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -606,7 +606,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="link"><i class="fa fa-eye"></i>Watched<i class="fa fa-chevron-down"></i></div>
|
<div class="link"><i class="fa fa-eye fa-fw"></i> Watched<i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -623,7 +623,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="link"><i class="fa fa-spinner"></i>Buffer Warnings<i class="fa fa-chevron-down"></i></div>
|
<div class="link"><i class="fa fa-spinner fa-fw"></i> Buffer Warnings<i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -642,7 +642,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="accordion-timeline" class="accordion list-unstyled">
|
<ul id="accordion-timeline" class="accordion list-unstyled">
|
||||||
<li>
|
<li>
|
||||||
<div class="link"><i class="fa fa-download"></i>Recently Added<i class="fa fa-chevron-down"></i></div>
|
<div class="link"><i class="fa fa-download fa-fw"></i> Recently Added<i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -659,17 +659,34 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="link"><i class="fa fa-server"></i>Server Down<i class="fa fa-chevron-down"></i></div>
|
<div class="link"><i class="fa fa-server fa-fw"></i> Plex External Port Down<i class="fa fa-chevron-down"></i></div>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
<li>
|
<li>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="notify_on_down_subject_text">Subject Line</label>
|
<label for="notify_on_extdown_subject_text">Subject Line</label>
|
||||||
<input class="form-control" type="text" id="notify_on_down_subject_text" name="notify_on_down_subject_text" value="${config['notify_on_down_subject_text']}" data-parsley-trigger="change" required>
|
<input class="form-control" type="text" id="notify_on_extdown_subject_text" name="notify_on_extdown_subject_text" value="${config['notify_on_extdown_subject_text']}" data-parsley-trigger="change" required>
|
||||||
<p class="help-block">Set a custom subject line.</p>
|
<p class="help-block">Set a custom subject line.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="notify_on_down_body_text">Message Body</label>
|
<label for="notify_on_extdown_body_text">Message Body</label>
|
||||||
<textarea class="form-control" id="notify_on_down_body_text" name="notify_on_down_body_text" data-parsley-trigger="change" data-autoresize required>${config['notify_on_down_body_text']}</textarea>
|
<textarea class="form-control" id="notify_on_extdown_body_text" name="notify_on_extdown_body_text" data-parsley-trigger="change" data-autoresize required>${config['notify_on_extdown_body_text']}</textarea>
|
||||||
|
<p class="help-block">Set a custom body.</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="link"><i class="fa fa-server fa-fw"></i> Plex Server Down<i class="fa fa-chevron-down"></i></div>
|
||||||
|
<ul class="submenu">
|
||||||
|
<li>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="notify_on_intdown_subject_text">Subject Line</label>
|
||||||
|
<input class="form-control" type="text" id="notify_on_intdown_subject_text" name="notify_on_intdown_subject_text" value="${config['notify_on_intdown_subject_text']}" data-parsley-trigger="change" required>
|
||||||
|
<p class="help-block">Set a custom subject line.</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="notify_on_intdown_body_text">Message Body</label>
|
||||||
|
<textarea class="form-control" id="notify_on_intdown_body_text" name="notify_on_intdown_body_text" data-parsley-trigger="change" data-autoresize required>${config['notify_on_intdown_body_text']}</textarea>
|
||||||
<p class="help-block">Set a custom body.</p>
|
<p class="help-block">Set a custom body.</p>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -692,7 +709,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
% for agent in available_notification_agents:
|
% for agent in available_notification_agents:
|
||||||
<li>
|
<li>
|
||||||
<span>
|
<span>
|
||||||
% if agent['on_play'] or agent['on_stop'] or agent['on_pause'] or agent['on_resume'] or agent['on_buffer'] or agent['on_watched'] or agent['on_created'] or agent['on_down']:
|
% if agent['on_play'] or agent['on_stop'] or agent['on_pause'] or agent['on_resume'] or agent['on_buffer'] or agent['on_watched'] or agent['on_created'] or agent['on_extdown'] or agent['on_intdown']:
|
||||||
<a href="javascript:void(0)" data-target="#notification-triggers-modal" data-id="${agent['id']}" class="toggle-notification-triggers-modal toggle-left active" data-toggle="modal"><i class="fa fa-lg fa-bell"></i></a>
|
<a href="javascript:void(0)" data-target="#notification-triggers-modal" data-id="${agent['id']}" class="toggle-notification-triggers-modal toggle-left active" data-toggle="modal"><i class="fa fa-lg fa-bell"></i></a>
|
||||||
% else:
|
% else:
|
||||||
<a href="javascript:void(0)" data-target="#notification-triggers-modal" data-id="${agent['id']}" class="toggle-notification-triggers-modal toggle-left" data-toggle="modal"><i class="fa fa-lg fa-bell"></i></a>
|
<a href="javascript:void(0)" data-target="#notification-triggers-modal" data-id="${agent['id']}" class="toggle-notification-triggers-modal toggle-left" data-toggle="modal"><i class="fa fa-lg fa-bell"></i></a>
|
||||||
|
|
|
@ -46,7 +46,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'BOXCAR_ON_BUFFER': (int, 'Boxcar', 0),
|
'BOXCAR_ON_BUFFER': (int, 'Boxcar', 0),
|
||||||
'BOXCAR_ON_WATCHED': (int, 'Boxcar', 0),
|
'BOXCAR_ON_WATCHED': (int, 'Boxcar', 0),
|
||||||
'BOXCAR_ON_CREATED': (int, 'Boxcar', 0),
|
'BOXCAR_ON_CREATED': (int, 'Boxcar', 0),
|
||||||
'BOXCAR_ON_DOWN': (int, 'Boxcar', 0),
|
'BOXCAR_ON_EXTDOWN': (int, 'Boxcar', 0),
|
||||||
|
'BOXCAR_ON_INTDOWN': (int, 'Boxcar', 0),
|
||||||
'BUFFER_THRESHOLD': (int, 'Monitoring', 3),
|
'BUFFER_THRESHOLD': (int, 'Monitoring', 3),
|
||||||
'BUFFER_WAIT': (int, 'Monitoring', 900),
|
'BUFFER_WAIT': (int, 'Monitoring', 900),
|
||||||
'CACHE_DIR': (str, 'General', ''),
|
'CACHE_DIR': (str, 'General', ''),
|
||||||
|
@ -72,7 +73,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'EMAIL_ON_BUFFER': (int, 'Email', 0),
|
'EMAIL_ON_BUFFER': (int, 'Email', 0),
|
||||||
'EMAIL_ON_WATCHED': (int, 'Email', 0),
|
'EMAIL_ON_WATCHED': (int, 'Email', 0),
|
||||||
'EMAIL_ON_CREATED': (int, 'Email', 0),
|
'EMAIL_ON_CREATED': (int, 'Email', 0),
|
||||||
'EMAIL_ON_DOWN': (int, 'Email', 0),
|
'EMAIL_ON_EXTDOWN': (int, 'Email', 0),
|
||||||
|
'EMAIL_ON_INTDOWN': (int, 'Email', 0),
|
||||||
'ENABLE_HTTPS': (int, 'General', 0),
|
'ENABLE_HTTPS': (int, 'General', 0),
|
||||||
'FIRST_RUN_COMPLETE': (int, 'General', 0),
|
'FIRST_RUN_COMPLETE': (int, 'General', 0),
|
||||||
'FREEZE_DB': (int, 'General', 0),
|
'FREEZE_DB': (int, 'General', 0),
|
||||||
|
@ -90,7 +92,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'GROWL_ON_BUFFER': (int, 'Growl', 0),
|
'GROWL_ON_BUFFER': (int, 'Growl', 0),
|
||||||
'GROWL_ON_WATCHED': (int, 'Growl', 0),
|
'GROWL_ON_WATCHED': (int, 'Growl', 0),
|
||||||
'GROWL_ON_CREATED': (int, 'Growl', 0),
|
'GROWL_ON_CREATED': (int, 'Growl', 0),
|
||||||
'GROWL_ON_DOWN': (int, 'Growl', 0),
|
'GROWL_ON_EXTDOWN': (int, 'Growl', 0),
|
||||||
|
'GROWL_ON_INTDOWN': (int, 'Growl', 0),
|
||||||
'HOME_LIBRARY_CARDS': (str, 'General', 'library_statistics_first'),
|
'HOME_LIBRARY_CARDS': (str, 'General', 'library_statistics_first'),
|
||||||
'HOME_STATS_LENGTH': (int, 'General', 30),
|
'HOME_STATS_LENGTH': (int, 'General', 30),
|
||||||
'HOME_STATS_TYPE': (int, 'General', 0),
|
'HOME_STATS_TYPE': (int, 'General', 0),
|
||||||
|
@ -116,7 +119,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'IFTTT_ON_BUFFER': (int, 'IFTTT', 0),
|
'IFTTT_ON_BUFFER': (int, 'IFTTT', 0),
|
||||||
'IFTTT_ON_WATCHED': (int, 'IFTTT', 0),
|
'IFTTT_ON_WATCHED': (int, 'IFTTT', 0),
|
||||||
'IFTTT_ON_CREATED': (int, 'IFTTT', 0),
|
'IFTTT_ON_CREATED': (int, 'IFTTT', 0),
|
||||||
'IFTTT_ON_DOWN': (int, 'IFTTT', 0),
|
'IFTTT_ON_EXTDOWN': (int, 'IFTTT', 0),
|
||||||
|
'IFTTT_ON_INTDOWN': (int, 'IFTTT', 0),
|
||||||
'JOURNAL_MODE': (str, 'Advanced', 'wal'),
|
'JOURNAL_MODE': (str, 'Advanced', 'wal'),
|
||||||
'LAUNCH_BROWSER': (int, 'General', 1),
|
'LAUNCH_BROWSER': (int, 'General', 1),
|
||||||
'LOG_DIR': (str, 'General', ''),
|
'LOG_DIR': (str, 'General', ''),
|
||||||
|
@ -142,7 +146,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'NMA_ON_BUFFER': (int, 'NMA', 0),
|
'NMA_ON_BUFFER': (int, 'NMA', 0),
|
||||||
'NMA_ON_WATCHED': (int, 'NMA', 0),
|
'NMA_ON_WATCHED': (int, 'NMA', 0),
|
||||||
'NMA_ON_CREATED': (int, 'NMA', 0),
|
'NMA_ON_CREATED': (int, 'NMA', 0),
|
||||||
'NMA_ON_DOWN': (int, 'NMA', 0),
|
'NMA_ON_EXTDOWN': (int, 'NMA', 0),
|
||||||
|
'NMA_ON_INTDOWN': (int, 'NMA', 0),
|
||||||
'NOTIFY_CONSECUTIVE': (int, 'Monitoring', 1),
|
'NOTIFY_CONSECUTIVE': (int, 'Monitoring', 1),
|
||||||
'NOTIFY_RECENTLY_ADDED_GRANDPARENT': (int, 'Monitoring', 0),
|
'NOTIFY_RECENTLY_ADDED_GRANDPARENT': (int, 'Monitoring', 0),
|
||||||
'NOTIFY_RECENTLY_ADDED_DELAY': (int, 'Monitoring', 60),
|
'NOTIFY_RECENTLY_ADDED_DELAY': (int, 'Monitoring', 60),
|
||||||
|
@ -161,8 +166,10 @@ _CONFIG_DEFINITIONS = {
|
||||||
'NOTIFY_ON_WATCHED_BODY_TEXT': (str, 'Monitoring', '{user} ({player}) has watched {title}.'),
|
'NOTIFY_ON_WATCHED_BODY_TEXT': (str, 'Monitoring', '{user} ({player}) has watched {title}.'),
|
||||||
'NOTIFY_ON_CREATED_SUBJECT_TEXT': (str, 'Monitoring', 'PlexPy ({server_name})'),
|
'NOTIFY_ON_CREATED_SUBJECT_TEXT': (str, 'Monitoring', 'PlexPy ({server_name})'),
|
||||||
'NOTIFY_ON_CREATED_BODY_TEXT': (str, 'Monitoring', '{title} was recently added to Plex.'),
|
'NOTIFY_ON_CREATED_BODY_TEXT': (str, 'Monitoring', '{title} was recently added to Plex.'),
|
||||||
'NOTIFY_ON_DOWN_SUBJECT_TEXT': (str, 'Monitoring', 'PlexPy ({server_name})'),
|
'NOTIFY_ON_EXTDOWN_SUBJECT_TEXT': (str, 'Monitoring', 'PlexPy ({server_name})'),
|
||||||
'NOTIFY_ON_DOWN_BODY_TEXT': (str, 'Monitoring', 'The Plex server is down.'),
|
'NOTIFY_ON_EXTDOWN_BODY_TEXT': (str, 'Monitoring', 'The Plex external port is down.'),
|
||||||
|
'NOTIFY_ON_INTDOWN_SUBJECT_TEXT': (str, 'Monitoring', 'PlexPy ({server_name})'),
|
||||||
|
'NOTIFY_ON_INTDOWN_BODY_TEXT': (str, 'Monitoring', 'The Plex server is down.'),
|
||||||
'OSX_NOTIFY_APP': (str, 'OSX_Notify', '/Applications/PlexPy'),
|
'OSX_NOTIFY_APP': (str, 'OSX_Notify', '/Applications/PlexPy'),
|
||||||
'OSX_NOTIFY_ENABLED': (int, 'OSX_Notify', 0),
|
'OSX_NOTIFY_ENABLED': (int, 'OSX_Notify', 0),
|
||||||
'OSX_NOTIFY_ON_PLAY': (int, 'OSX_Notify', 0),
|
'OSX_NOTIFY_ON_PLAY': (int, 'OSX_Notify', 0),
|
||||||
|
@ -172,7 +179,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'OSX_NOTIFY_ON_BUFFER': (int, 'OSX_Notify', 0),
|
'OSX_NOTIFY_ON_BUFFER': (int, 'OSX_Notify', 0),
|
||||||
'OSX_NOTIFY_ON_WATCHED': (int, 'OSX_Notify', 0),
|
'OSX_NOTIFY_ON_WATCHED': (int, 'OSX_Notify', 0),
|
||||||
'OSX_NOTIFY_ON_CREATED': (int, 'OSX_Notify', 0),
|
'OSX_NOTIFY_ON_CREATED': (int, 'OSX_Notify', 0),
|
||||||
'OSX_NOTIFY_ON_DOWN': (int, 'OSX_Notify', 0),
|
'OSX_NOTIFY_ON_EXTDOWN': (int, 'OSX_Notify', 0),
|
||||||
|
'OSX_NOTIFY_ON_INTDOWN': (int, 'OSX_Notify', 0),
|
||||||
'PLEX_CLIENT_HOST': (str, 'Plex', ''),
|
'PLEX_CLIENT_HOST': (str, 'Plex', ''),
|
||||||
'PLEX_ENABLED': (int, 'Plex', 0),
|
'PLEX_ENABLED': (int, 'Plex', 0),
|
||||||
'PLEX_PASSWORD': (str, 'Plex', ''),
|
'PLEX_PASSWORD': (str, 'Plex', ''),
|
||||||
|
@ -184,7 +192,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'PLEX_ON_BUFFER': (int, 'Plex', 0),
|
'PLEX_ON_BUFFER': (int, 'Plex', 0),
|
||||||
'PLEX_ON_WATCHED': (int, 'Plex', 0),
|
'PLEX_ON_WATCHED': (int, 'Plex', 0),
|
||||||
'PLEX_ON_CREATED': (int, 'Plex', 0),
|
'PLEX_ON_CREATED': (int, 'Plex', 0),
|
||||||
'PLEX_ON_DOWN': (int, 'Plex', 0),
|
'PLEX_ON_EXTDOWN': (int, 'Plex', 0),
|
||||||
|
'PLEX_ON_INTDOWN': (int, 'Plex', 0),
|
||||||
'PROWL_ENABLED': (int, 'Prowl', 0),
|
'PROWL_ENABLED': (int, 'Prowl', 0),
|
||||||
'PROWL_KEYS': (str, 'Prowl', ''),
|
'PROWL_KEYS': (str, 'Prowl', ''),
|
||||||
'PROWL_PRIORITY': (int, 'Prowl', 0),
|
'PROWL_PRIORITY': (int, 'Prowl', 0),
|
||||||
|
@ -195,7 +204,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'PROWL_ON_BUFFER': (int, 'Prowl', 0),
|
'PROWL_ON_BUFFER': (int, 'Prowl', 0),
|
||||||
'PROWL_ON_WATCHED': (int, 'Prowl', 0),
|
'PROWL_ON_WATCHED': (int, 'Prowl', 0),
|
||||||
'PROWL_ON_CREATED': (int, 'Prowl', 0),
|
'PROWL_ON_CREATED': (int, 'Prowl', 0),
|
||||||
'PROWL_ON_DOWN': (int, 'Prowl', 0),
|
'PROWL_ON_EXTDOWN': (int, 'Prowl', 0),
|
||||||
|
'PROWL_ON_INTDOWN': (int, 'Prowl', 0),
|
||||||
'PUSHALOT_APIKEY': (str, 'Pushalot', ''),
|
'PUSHALOT_APIKEY': (str, 'Pushalot', ''),
|
||||||
'PUSHALOT_ENABLED': (int, 'Pushalot', 0),
|
'PUSHALOT_ENABLED': (int, 'Pushalot', 0),
|
||||||
'PUSHALOT_ON_PLAY': (int, 'Pushalot', 0),
|
'PUSHALOT_ON_PLAY': (int, 'Pushalot', 0),
|
||||||
|
@ -205,7 +215,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'PUSHALOT_ON_BUFFER': (int, 'Pushalot', 0),
|
'PUSHALOT_ON_BUFFER': (int, 'Pushalot', 0),
|
||||||
'PUSHALOT_ON_WATCHED': (int, 'Pushalot', 0),
|
'PUSHALOT_ON_WATCHED': (int, 'Pushalot', 0),
|
||||||
'PUSHALOT_ON_CREATED': (int, 'Pushalot', 0),
|
'PUSHALOT_ON_CREATED': (int, 'Pushalot', 0),
|
||||||
'PUSHALOT_ON_DOWN': (int, 'Pushalot', 0),
|
'PUSHALOT_ON_EXTDOWN': (int, 'Pushalot', 0),
|
||||||
|
'PUSHALOT_ON_INTDOWN': (int, 'Pushalot', 0),
|
||||||
'PUSHBULLET_APIKEY': (str, 'PushBullet', ''),
|
'PUSHBULLET_APIKEY': (str, 'PushBullet', ''),
|
||||||
'PUSHBULLET_DEVICEID': (str, 'PushBullet', ''),
|
'PUSHBULLET_DEVICEID': (str, 'PushBullet', ''),
|
||||||
'PUSHBULLET_CHANNEL_TAG': (str, 'PushBullet', ''),
|
'PUSHBULLET_CHANNEL_TAG': (str, 'PushBullet', ''),
|
||||||
|
@ -217,7 +228,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'PUSHBULLET_ON_BUFFER': (int, 'PushBullet', 0),
|
'PUSHBULLET_ON_BUFFER': (int, 'PushBullet', 0),
|
||||||
'PUSHBULLET_ON_WATCHED': (int, 'PushBullet', 0),
|
'PUSHBULLET_ON_WATCHED': (int, 'PushBullet', 0),
|
||||||
'PUSHBULLET_ON_CREATED': (int, 'PushBullet', 0),
|
'PUSHBULLET_ON_CREATED': (int, 'PushBullet', 0),
|
||||||
'PUSHBULLET_ON_DOWN': (int, 'PushBullet', 0),
|
'PUSHBULLET_ON_EXTDOWN': (int, 'PushBullet', 0),
|
||||||
|
'PUSHBULLET_ON_INTDOWN': (int, 'PushBullet', 0),
|
||||||
'PUSHOVER_APITOKEN': (str, 'Pushover', ''),
|
'PUSHOVER_APITOKEN': (str, 'Pushover', ''),
|
||||||
'PUSHOVER_ENABLED': (int, 'Pushover', 0),
|
'PUSHOVER_ENABLED': (int, 'Pushover', 0),
|
||||||
'PUSHOVER_KEYS': (str, 'Pushover', ''),
|
'PUSHOVER_KEYS': (str, 'Pushover', ''),
|
||||||
|
@ -230,7 +242,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'PUSHOVER_ON_BUFFER': (int, 'Pushover', 0),
|
'PUSHOVER_ON_BUFFER': (int, 'Pushover', 0),
|
||||||
'PUSHOVER_ON_WATCHED': (int, 'Pushover', 0),
|
'PUSHOVER_ON_WATCHED': (int, 'Pushover', 0),
|
||||||
'PUSHOVER_ON_CREATED': (int, 'Pushover', 0),
|
'PUSHOVER_ON_CREATED': (int, 'Pushover', 0),
|
||||||
'PUSHOVER_ON_DOWN': (int, 'Pushover', 0),
|
'PUSHOVER_ON_EXTDOWN': (int, 'Pushover', 0),
|
||||||
|
'PUSHOVER_ON_INTDOWN': (int, 'Pushover', 0),
|
||||||
'REFRESH_USERS_INTERVAL': (int, 'Monitoring', 12),
|
'REFRESH_USERS_INTERVAL': (int, 'Monitoring', 12),
|
||||||
'REFRESH_USERS_ON_STARTUP': (int, 'Monitoring', 1),
|
'REFRESH_USERS_ON_STARTUP': (int, 'Monitoring', 1),
|
||||||
'TELEGRAM_BOT_TOKEN': (str, 'Telegram', ''),
|
'TELEGRAM_BOT_TOKEN': (str, 'Telegram', ''),
|
||||||
|
@ -243,7 +256,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'TELEGRAM_ON_BUFFER': (int, 'Telegram', 0),
|
'TELEGRAM_ON_BUFFER': (int, 'Telegram', 0),
|
||||||
'TELEGRAM_ON_WATCHED': (int, 'Telegram', 0),
|
'TELEGRAM_ON_WATCHED': (int, 'Telegram', 0),
|
||||||
'TELEGRAM_ON_CREATED': (int, 'Telegram', 0),
|
'TELEGRAM_ON_CREATED': (int, 'Telegram', 0),
|
||||||
'TELEGRAM_ON_DOWN': (int, 'Telegram', 0),
|
'TELEGRAM_ON_EXTDOWN': (int, 'Telegram', 0),
|
||||||
|
'TELEGRAM_ON_INTDOWN': (int, 'Telegram', 0),
|
||||||
'TV_NOTIFY_ENABLE': (int, 'Monitoring', 0),
|
'TV_NOTIFY_ENABLE': (int, 'Monitoring', 0),
|
||||||
'TV_NOTIFY_ON_START': (int, 'Monitoring', 1),
|
'TV_NOTIFY_ON_START': (int, 'Monitoring', 1),
|
||||||
'TV_NOTIFY_ON_STOP': (int, 'Monitoring', 0),
|
'TV_NOTIFY_ON_STOP': (int, 'Monitoring', 0),
|
||||||
|
@ -259,7 +273,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'TWITTER_ON_BUFFER': (int, 'Twitter', 0),
|
'TWITTER_ON_BUFFER': (int, 'Twitter', 0),
|
||||||
'TWITTER_ON_WATCHED': (int, 'Twitter', 0),
|
'TWITTER_ON_WATCHED': (int, 'Twitter', 0),
|
||||||
'TWITTER_ON_CREATED': (int, 'Twitter', 0),
|
'TWITTER_ON_CREATED': (int, 'Twitter', 0),
|
||||||
'TWITTER_ON_DOWN': (int, 'Twitter', 0),
|
'TWITTER_ON_EXTDOWN': (int, 'Twitter', 0),
|
||||||
|
'TWITTER_ON_INTDOWN': (int, 'Twitter', 0),
|
||||||
'UPDATE_DB_INTERVAL': (int, 'General', 24),
|
'UPDATE_DB_INTERVAL': (int, 'General', 24),
|
||||||
'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1),
|
'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1),
|
||||||
'VIDEO_LOGGING_ENABLE': (int, 'Monitoring', 1),
|
'VIDEO_LOGGING_ENABLE': (int, 'Monitoring', 1),
|
||||||
|
@ -274,7 +289,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'XBMC_ON_BUFFER': (int, 'XBMC', 0),
|
'XBMC_ON_BUFFER': (int, 'XBMC', 0),
|
||||||
'XBMC_ON_WATCHED': (int, 'XBMC', 0),
|
'XBMC_ON_WATCHED': (int, 'XBMC', 0),
|
||||||
'XBMC_ON_CREATED': (int, 'XBMC', 0),
|
'XBMC_ON_CREATED': (int, 'XBMC', 0),
|
||||||
'XBMC_ON_DOWN': (int, 'XBMC', 0)
|
'XBMC_ON_EXTDOWN': (int, 'XBMC', 0),
|
||||||
|
'XBMC_ON_INTDOWN': (int, 'XBMC', 0)
|
||||||
}
|
}
|
||||||
# pylint:disable=R0902
|
# pylint:disable=R0902
|
||||||
# it might be nice to refactor for fewer instance variables
|
# it might be nice to refactor for fewer instance variables
|
||||||
|
|
|
@ -181,7 +181,13 @@ def notify_timeline(timeline_data=None, notify_action=None):
|
||||||
set_notify_state(session=timeline_data, state=notify_action, agent_info=agent)
|
set_notify_state(session=timeline_data, state=notify_action, agent_info=agent)
|
||||||
elif not timeline_data and notify_action:
|
elif not timeline_data and notify_action:
|
||||||
for agent in notifiers.available_notification_agents():
|
for agent in notifiers.available_notification_agents():
|
||||||
if agent['on_down'] and notify_action == 'down':
|
if agent['on_extdown'] and notify_action == 'extdown':
|
||||||
|
# Build and send notification
|
||||||
|
notify_strings = build_server_notify_text(state=notify_action)
|
||||||
|
notifiers.send_notification(config_id=agent['id'],
|
||||||
|
subject=notify_strings[0],
|
||||||
|
body=notify_strings[1])
|
||||||
|
if agent['on_intdown'] and notify_action == 'intdown':
|
||||||
# Build and send notification
|
# Build and send notification
|
||||||
notify_strings = build_server_notify_text(state=notify_action)
|
notify_strings = build_server_notify_text(state=notify_action)
|
||||||
notifiers.send_notification(config_id=agent['id'],
|
notifiers.send_notification(config_id=agent['id'],
|
||||||
|
@ -619,8 +625,10 @@ def build_server_notify_text(state=None):
|
||||||
logger.error(u"PlexPy Notifier :: Unable to retrieve server uptime.")
|
logger.error(u"PlexPy Notifier :: Unable to retrieve server uptime.")
|
||||||
server_uptime = 'N/A'
|
server_uptime = 'N/A'
|
||||||
|
|
||||||
on_down_subject = plexpy.CONFIG.NOTIFY_ON_DOWN_SUBJECT_TEXT
|
on_extdown_subject = plexpy.CONFIG.NOTIFY_ON_EXTDOWN_SUBJECT_TEXT
|
||||||
on_down_body = plexpy.CONFIG.NOTIFY_ON_DOWN_BODY_TEXT
|
on_extdown_body = plexpy.CONFIG.NOTIFY_ON_EXTDOWN_BODY_TEXT
|
||||||
|
on_intdown_subject = plexpy.CONFIG.NOTIFY_ON_INTDOWN_SUBJECT_TEXT
|
||||||
|
on_intdown_body = plexpy.CONFIG.NOTIFY_ON_INTDOWN_BODY_TEXT
|
||||||
|
|
||||||
available_params = {'server_name': server_name,
|
available_params = {'server_name': server_name,
|
||||||
'server_uptime': server_uptime}
|
'server_uptime': server_uptime}
|
||||||
|
@ -628,20 +636,42 @@ def build_server_notify_text(state=None):
|
||||||
# Default text
|
# Default text
|
||||||
subject_text = 'PlexPy (%s)' % server_name
|
subject_text = 'PlexPy (%s)' % server_name
|
||||||
|
|
||||||
if state == 'down':
|
if state == 'extdown':
|
||||||
# Default body text
|
# Default body text
|
||||||
body_text = 'Unable to get a response from the server.'
|
body_text = 'The Plex external port is down.'
|
||||||
|
|
||||||
if on_down_subject and on_down_body:
|
if on_extdown_subject and on_extdown_body:
|
||||||
try:
|
try:
|
||||||
subject_text = unicode(on_down_subject).format(**available_params)
|
subject_text = unicode(on_extdown_subject).format(**available_params)
|
||||||
except LookupError, e:
|
except LookupError, e:
|
||||||
logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e)
|
logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e)
|
||||||
except:
|
except:
|
||||||
logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.")
|
logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
body_text = unicode(on_down_body).format(**available_params)
|
body_text = unicode(on_extdown_body).format(**available_params)
|
||||||
|
except LookupError, e:
|
||||||
|
logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e)
|
||||||
|
except:
|
||||||
|
logger.error(u"PlexPy Notifier :: Unable to parse custom notification body. Using fallback.")
|
||||||
|
|
||||||
|
return [subject_text, body_text]
|
||||||
|
else:
|
||||||
|
return [subject_text, body_text]
|
||||||
|
elif state == 'intdown':
|
||||||
|
# Default body text
|
||||||
|
body_text = 'The Plex server is down.'
|
||||||
|
|
||||||
|
if on_intdown_subject and on_intdown_body:
|
||||||
|
try:
|
||||||
|
subject_text = unicode(on_intdown_subject).format(**available_params)
|
||||||
|
except LookupError, e:
|
||||||
|
logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification subject. Using fallback." % e)
|
||||||
|
except:
|
||||||
|
logger.error(u"PlexPy Notifier :: Unable to parse custom notification subject. Using fallback.")
|
||||||
|
|
||||||
|
try:
|
||||||
|
body_text = unicode(on_intdown_body).format(**available_params)
|
||||||
except LookupError, e:
|
except LookupError, e:
|
||||||
logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e)
|
logger.error(u"PlexPy Notifier :: Unable to parse field %s in notification body. Using fallback." % e)
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -67,7 +67,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.GROWL_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.GROWL_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.GROWL_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.GROWL_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.GROWL_ON_CREATED,
|
'on_created': plexpy.CONFIG.GROWL_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.GROWL_ON_DOWN
|
'on_extdown': plexpy.CONFIG.GROWL_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.GROWL_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'Prowl',
|
{'name': 'Prowl',
|
||||||
'id': AGENT_IDS['Prowl'],
|
'id': AGENT_IDS['Prowl'],
|
||||||
|
@ -81,7 +82,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.PROWL_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.PROWL_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.PROWL_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.PROWL_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.PROWL_ON_CREATED,
|
'on_created': plexpy.CONFIG.PROWL_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.PROWL_ON_DOWN
|
'on_extdown': plexpy.CONFIG.PROWL_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.PROWL_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'XBMC',
|
{'name': 'XBMC',
|
||||||
'id': AGENT_IDS['XBMC'],
|
'id': AGENT_IDS['XBMC'],
|
||||||
|
@ -95,7 +97,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.XBMC_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.XBMC_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.XBMC_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.XBMC_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.XBMC_ON_CREATED,
|
'on_created': plexpy.CONFIG.XBMC_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.XBMC_ON_DOWN
|
'on_extdown': plexpy.CONFIG.XBMC_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.XBMC_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'Plex',
|
{'name': 'Plex',
|
||||||
'id': AGENT_IDS['Plex'],
|
'id': AGENT_IDS['Plex'],
|
||||||
|
@ -109,7 +112,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.PLEX_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.PLEX_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.PLEX_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.PLEX_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.PLEX_ON_CREATED,
|
'on_created': plexpy.CONFIG.PLEX_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.PLEX_ON_DOWN
|
'on_extdown': plexpy.CONFIG.PLEX_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.PLEX_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'NotifyMyAndroid',
|
{'name': 'NotifyMyAndroid',
|
||||||
'id': AGENT_IDS['NMA'],
|
'id': AGENT_IDS['NMA'],
|
||||||
|
@ -123,7 +127,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.NMA_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.NMA_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.NMA_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.NMA_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.NMA_ON_CREATED,
|
'on_created': plexpy.CONFIG.NMA_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.NMA_ON_DOWN
|
'on_extdown': plexpy.CONFIG.NMA_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.NMA_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'Pushalot',
|
{'name': 'Pushalot',
|
||||||
'id': AGENT_IDS['Pushalot'],
|
'id': AGENT_IDS['Pushalot'],
|
||||||
|
@ -137,7 +142,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.PUSHALOT_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.PUSHALOT_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.PUSHALOT_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.PUSHALOT_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.PUSHALOT_ON_CREATED,
|
'on_created': plexpy.CONFIG.PUSHALOT_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.PUSHALOT_ON_DOWN
|
'on_extdown': plexpy.CONFIG.PUSHALOT_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.PUSHALOT_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'Pushbullet',
|
{'name': 'Pushbullet',
|
||||||
'id': AGENT_IDS['Pushbullet'],
|
'id': AGENT_IDS['Pushbullet'],
|
||||||
|
@ -151,7 +157,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.PUSHBULLET_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.PUSHBULLET_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.PUSHBULLET_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.PUSHBULLET_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.PUSHBULLET_ON_CREATED,
|
'on_created': plexpy.CONFIG.PUSHBULLET_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.PUSHBULLET_ON_DOWN
|
'on_extdown': plexpy.CONFIG.PUSHBULLET_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.PUSHBULLET_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'Pushover',
|
{'name': 'Pushover',
|
||||||
'id': AGENT_IDS['Pushover'],
|
'id': AGENT_IDS['Pushover'],
|
||||||
|
@ -165,7 +172,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.PUSHOVER_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.PUSHOVER_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.PUSHOVER_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.PUSHOVER_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.PUSHOVER_ON_CREATED,
|
'on_created': plexpy.CONFIG.PUSHOVER_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.PUSHOVER_ON_DOWN
|
'on_extdown': plexpy.CONFIG.PUSHOVER_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.PUSHOVER_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'Boxcar2',
|
{'name': 'Boxcar2',
|
||||||
'id': AGENT_IDS['Boxcar2'],
|
'id': AGENT_IDS['Boxcar2'],
|
||||||
|
@ -179,7 +187,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.BOXCAR_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.BOXCAR_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.BOXCAR_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.BOXCAR_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.BOXCAR_ON_CREATED,
|
'on_created': plexpy.CONFIG.BOXCAR_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.BOXCAR_ON_DOWN
|
'on_extdown': plexpy.CONFIG.BOXCAR_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.BOXCAR_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'E-mail',
|
{'name': 'E-mail',
|
||||||
'id': AGENT_IDS['Email'],
|
'id': AGENT_IDS['Email'],
|
||||||
|
@ -193,7 +202,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.EMAIL_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.EMAIL_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.EMAIL_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.EMAIL_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.EMAIL_ON_CREATED,
|
'on_created': plexpy.CONFIG.EMAIL_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.EMAIL_ON_DOWN
|
'on_extdown': plexpy.CONFIG.EMAIL_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.EMAIL_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'Twitter',
|
{'name': 'Twitter',
|
||||||
'id': AGENT_IDS['Twitter'],
|
'id': AGENT_IDS['Twitter'],
|
||||||
|
@ -207,7 +217,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.TWITTER_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.TWITTER_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.TWITTER_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.TWITTER_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.TWITTER_ON_CREATED,
|
'on_created': plexpy.CONFIG.TWITTER_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.TWITTER_ON_DOWN
|
'on_extdown': plexpy.CONFIG.TWITTER_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.TWITTER_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'IFTTT',
|
{'name': 'IFTTT',
|
||||||
'id': AGENT_IDS['IFTTT'],
|
'id': AGENT_IDS['IFTTT'],
|
||||||
|
@ -221,7 +232,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.IFTTT_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.IFTTT_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.IFTTT_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.IFTTT_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.IFTTT_ON_CREATED,
|
'on_created': plexpy.CONFIG.IFTTT_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.IFTTT_ON_DOWN
|
'on_extdown': plexpy.CONFIG.IFTTT_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.IFTTT_ON_INTDOWN
|
||||||
},
|
},
|
||||||
{'name': 'Telegram',
|
{'name': 'Telegram',
|
||||||
'id': AGENT_IDS['Telegram'],
|
'id': AGENT_IDS['Telegram'],
|
||||||
|
@ -235,7 +247,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.TELEGRAM_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.TELEGRAM_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.TELEGRAM_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.TELEGRAM_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.TELEGRAM_ON_CREATED,
|
'on_created': plexpy.CONFIG.TELEGRAM_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.TELEGRAM_ON_DOWN
|
'on_extdown': plexpy.CONFIG.TELEGRAM_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.TELEGRAM_ON_INTDOWN
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -254,7 +267,8 @@ def available_notification_agents():
|
||||||
'on_buffer': plexpy.CONFIG.OSX_NOTIFY_ON_BUFFER,
|
'on_buffer': plexpy.CONFIG.OSX_NOTIFY_ON_BUFFER,
|
||||||
'on_watched': plexpy.CONFIG.OSX_NOTIFY_ON_WATCHED,
|
'on_watched': plexpy.CONFIG.OSX_NOTIFY_ON_WATCHED,
|
||||||
'on_created': plexpy.CONFIG.OSX_NOTIFY_ON_CREATED,
|
'on_created': plexpy.CONFIG.OSX_NOTIFY_ON_CREATED,
|
||||||
'on_down': plexpy.CONFIG.OSX_NOTIFY_ON_DOWN
|
'on_extdown': plexpy.CONFIG.OSX_NOTIFY_ON_EXTDOWN,
|
||||||
|
'on_intdown': plexpy.CONFIG.OSX_NOTIFY_ON_INTDOWN
|
||||||
})
|
})
|
||||||
|
|
||||||
return agents
|
return agents
|
||||||
|
|
|
@ -462,8 +462,10 @@ class WebInterface(object):
|
||||||
"notify_on_watched_body_text": plexpy.CONFIG.NOTIFY_ON_WATCHED_BODY_TEXT,
|
"notify_on_watched_body_text": plexpy.CONFIG.NOTIFY_ON_WATCHED_BODY_TEXT,
|
||||||
"notify_on_created_subject_text": plexpy.CONFIG.NOTIFY_ON_CREATED_SUBJECT_TEXT,
|
"notify_on_created_subject_text": plexpy.CONFIG.NOTIFY_ON_CREATED_SUBJECT_TEXT,
|
||||||
"notify_on_created_body_text": plexpy.CONFIG.NOTIFY_ON_CREATED_BODY_TEXT,
|
"notify_on_created_body_text": plexpy.CONFIG.NOTIFY_ON_CREATED_BODY_TEXT,
|
||||||
"notify_on_down_subject_text": plexpy.CONFIG.NOTIFY_ON_DOWN_SUBJECT_TEXT,
|
"notify_on_extdown_subject_text": plexpy.CONFIG.NOTIFY_ON_EXTDOWN_SUBJECT_TEXT,
|
||||||
"notify_on_down_body_text": plexpy.CONFIG.NOTIFY_ON_DOWN_BODY_TEXT,
|
"notify_on_extdown_body_text": plexpy.CONFIG.NOTIFY_ON_EXTDOWN_BODY_TEXT,
|
||||||
|
"notify_on_intdown_subject_text": plexpy.CONFIG.NOTIFY_ON_INTDOWN_SUBJECT_TEXT,
|
||||||
|
"notify_on_intdown_body_text": plexpy.CONFIG.NOTIFY_ON_INTDOWN_BODY_TEXT,
|
||||||
"home_stats_length": plexpy.CONFIG.HOME_STATS_LENGTH,
|
"home_stats_length": plexpy.CONFIG.HOME_STATS_LENGTH,
|
||||||
"home_stats_type": checked(plexpy.CONFIG.HOME_STATS_TYPE),
|
"home_stats_type": checked(plexpy.CONFIG.HOME_STATS_TYPE),
|
||||||
"home_stats_count": plexpy.CONFIG.HOME_STATS_COUNT,
|
"home_stats_count": plexpy.CONFIG.HOME_STATS_COUNT,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue