Add image type option to remote app notifications

This commit is contained in:
JonnyWong16 2021-03-25 16:39:52 -07:00
parent 7ebed4ffd7
commit 3a520405c4
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -888,7 +888,8 @@ class ANDROIDAPP(Notifier):
"""
NAME = 'Tautulli Remote Android App'
_DEFAULT_CONFIG = {'device_id': '',
'priority': 3
'priority': 3,
'notification_type': 0
}
def agent_notify(self, subject='', body='', action='', notification_id=None, **kwargs):
@ -907,6 +908,7 @@ class ANDROIDAPP(Notifier):
'body': body,
'action': action,
'priority': self.config['priority'],
'notification_type': self.config['notification_type'],
'session_key': pretty_metadata.parameters.get('session_key', ''),
'session_id': pretty_metadata.parameters.get('session_id', ''),
'user_id': pretty_metadata.parameters.get('user_id', ''),
@ -1047,6 +1049,17 @@ class ANDROIDAPP(Notifier):
'input_type': 'select',
'select_options': {1: 'Minimum', 2: 'Low', 3: 'Normal', 4: 'High'}
})
config_option.append({
'label': 'Notification Image Type',
'value': self.config['notification_type'],
'name': 'androidapp_notification_type',
'description': 'Set the notification image type.',
'input_type': 'select',
'select_options': {0: 'No notification image',
1: 'Small image (Expandable text)',
2: 'Large image (Non-expandable text)'
}
})
return config_option