Fix no started parameter for recently added notifications

* Fixes #1940
This commit is contained in:
JonnyWong16 2022-12-22 13:52:11 -08:00
commit b0ba73cf46
No known key found for this signature in database
GPG key ID: F76A8BC283779014

View file

@ -985,8 +985,8 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
'product': notify_params['product'], 'product': notify_params['product'],
'player': notify_params['player'], 'player': notify_params['player'],
'ip_address': notify_params.get('ip_address', 'N/A'), 'ip_address': notify_params.get('ip_address', 'N/A'),
'started_datestamp': arrow.get(notify_params['started']).format(date_format), 'started_datestamp': arrow.get(notify_params['started']).format(date_format) if notify_params['started'] else '',
'started_timestamp': arrow.get(notify_params['started']).format(time_format), 'started_timestamp': arrow.get(notify_params['started']).format(time_format) if notify_params['started'] else '',
'started_unixtime': notify_params['started'], 'started_unixtime': notify_params['started'],
'stopped_datestamp': arrow.get(notify_params['stopped']).format(date_format) if notify_params['stopped'] else '', 'stopped_datestamp': arrow.get(notify_params['stopped']).format(date_format) if notify_params['stopped'] else '',
'stopped_timestamp': arrow.get(notify_params['stopped']).format(time_format) if notify_params['stopped'] else '', 'stopped_timestamp': arrow.get(notify_params['stopped']).format(time_format) if notify_params['stopped'] else '',