Add platform version and product version notification parameters

Closes #2244
This commit is contained in:
JonnyWong16 2024-03-24 16:08:58 -07:00
parent 41693ee5f1
commit cfdb6975f0
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 4 additions and 0 deletions

View file

@ -397,7 +397,9 @@ NOTIFICATION_PARAMETERS = [
{'name': 'User Thumb', 'type': 'str', 'value': 'user_thumb', 'description': 'The profile picture URL of the user streaming.'},
{'name': 'Device', 'type': 'str', 'value': 'device', 'description': 'The type of client device being used for playback.'},
{'name': 'Platform', 'type': 'str', 'value': 'platform', 'description': 'The type of client platform being used for playback.'},
{'name': 'Platform Version', 'type': 'str', 'value': 'platform_version', 'description': 'The version number of the client platform being used for playback.'},
{'name': 'Product', 'type': 'str', 'value': 'product', 'description': 'The type of client product being used for playback.'},
{'name': 'Product Version', 'type': 'str', 'value': 'product_version', 'description': 'The version number of client product being used for playback.'},
{'name': 'Player', 'type': 'str', 'value': 'player', 'description': 'The name of the player being used for playback.'},
{'name': 'Initial Stream', 'type': 'int', 'value': 'initial_stream', 'description': 'If the stream is the initial stream of a continuous streaming session.', 'example': '0 or 1'},
{'name': 'IP Address', 'type': 'str', 'value': 'ip_address', 'description': 'The IP address of the device being used for playback.'},

View file

@ -1005,7 +1005,9 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
'user_thumb': notify_params['user_thumb'],
'device': notify_params['device'],
'platform': notify_params['platform'],
'platform_version': notify_params['platform_version'],
'product': notify_params['product'],
'product_version': notify_params['product_version'],
'player': notify_params['player'],
'ip_address': notify_params.get('ip_address', 'N/A'),
'started_datestamp': CustomArrow(arrow.get(notify_params['started']), date_format) if notify_params['started'] else '',