mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -07:00
Add remote access notification parameters
This commit is contained in:
parent
54a7839421
commit
2162210393
3 changed files with 22 additions and 1 deletions
|
@ -551,6 +551,18 @@ NOTIFICATION_PARAMETERS = [
|
||||||
{'name': 'Indexes', 'type': 'int', 'value': 'indexes', 'description': 'If the media has video preview thumbnails.', 'example': '0 or 1'},
|
{'name': 'Indexes', 'type': 'int', 'value': 'indexes', 'description': 'If the media has video preview thumbnails.', 'example': '0 or 1'},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'category': 'Plex Remote Access',
|
||||||
|
'parameters': [
|
||||||
|
{'name': 'Remote Access Mapping State', 'type': 'str', 'value': 'remote_access_mapping_state', 'description': 'The mapping state of the Plex remote access port.'},
|
||||||
|
{'name': 'Remote Access Mapping Error', 'type': 'str', 'value': 'remote_access_mapping_error', 'description': 'The mapping error of the Plex remote access port.'},
|
||||||
|
{'name': 'Remote Access Public IP Address', 'type': 'str', 'value': 'remote_access_public_address', 'description': 'The Plex remote access public IP address.'},
|
||||||
|
{'name': 'Remote Access Public Port', 'type': 'str', 'value': 'remote_access_public_port', 'description': 'The Plex remote access public port.'},
|
||||||
|
{'name': 'Remote Access Private IP Address', 'type': 'str', 'value': 'remote_access_private_address', 'description': 'The Plex remote access private IP address.'},
|
||||||
|
{'name': 'Remote Access Private Port', 'type': 'str', 'value': 'remote_access_private_port', 'description': 'The Plex remote access private port.'},
|
||||||
|
{'name': 'Remote Access Failure Reason', 'type': 'str', 'value': 'remote_access_reason', 'description': 'The failure reason for Plex remote access going down.'},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'category': 'Plex Update Available',
|
'category': 'Plex Update Available',
|
||||||
'parameters': [
|
'parameters': [
|
||||||
|
|
|
@ -1041,6 +1041,7 @@ def build_server_notify_params(notify_action=None, **kwargs):
|
||||||
|
|
||||||
pms_download_info = defaultdict(str, kwargs.pop('pms_download_info', {}))
|
pms_download_info = defaultdict(str, kwargs.pop('pms_download_info', {}))
|
||||||
plexpy_download_info = defaultdict(str, kwargs.pop('plexpy_download_info', {}))
|
plexpy_download_info = defaultdict(str, kwargs.pop('plexpy_download_info', {}))
|
||||||
|
remote_access_info = defaultdict(str, kwargs.pop('remote_access_info', {}))
|
||||||
|
|
||||||
now = arrow.now()
|
now = arrow.now()
|
||||||
now_iso = now.isocalendar()
|
now_iso = now.isocalendar()
|
||||||
|
@ -1072,6 +1073,14 @@ def build_server_notify_params(notify_action=None, **kwargs):
|
||||||
'timestamp': now.format(time_format),
|
'timestamp': now.format(time_format),
|
||||||
'unixtime': int(time.time()),
|
'unixtime': int(time.time()),
|
||||||
'utctime': helpers.utc_now_iso(),
|
'utctime': helpers.utc_now_iso(),
|
||||||
|
# Plex remote access parameters
|
||||||
|
'remote_access_mapping_state': remote_access_info['mapping_state'],
|
||||||
|
'remote_access_mapping_error': remote_access_info['mapping_error'],
|
||||||
|
'remote_access_public_address': remote_access_info['public_address'],
|
||||||
|
'remote_access_public_port': remote_access_info['public_port'],
|
||||||
|
'remote_access_private_address': remote_access_info['private_address'],
|
||||||
|
'remote_access_private_port': remote_access_info['private_port'],
|
||||||
|
'remote_access_reason': remote_access_info['reason'],
|
||||||
# Plex Media Server update parameters
|
# Plex Media Server update parameters
|
||||||
'update_version': pms_download_info['version'],
|
'update_version': pms_download_info['version'],
|
||||||
'update_url': pms_download_info['download_url'],
|
'update_url': pms_download_info['download_url'],
|
||||||
|
|
|
@ -370,7 +370,7 @@ def available_notification_actions(agent_id=None):
|
||||||
'name': 'on_extdown',
|
'name': 'on_extdown',
|
||||||
'description': 'Trigger a notification when the Plex Media Server cannot be reached externally.',
|
'description': 'Trigger a notification when the Plex Media Server cannot be reached externally.',
|
||||||
'subject': 'Tautulli ({server_name})',
|
'subject': 'Tautulli ({server_name})',
|
||||||
'body': 'The Plex Media Server remote access is down.',
|
'body': 'The Plex Media Server remote access is down. ({remote_access_reason})',
|
||||||
'icon': 'fa-server',
|
'icon': 'fa-server',
|
||||||
'media_types': ('server',)
|
'media_types': ('server',)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue