Add duration_time notification parameter

This commit is contained in:
JonnyWong16 2023-11-07 17:12:19 -08:00
parent ae17d2dde0
commit ab5836a65b
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 2 additions and 0 deletions

View file

@ -547,6 +547,7 @@ NOTIFICATION_PARAMETERS = [
{'name': 'Duration', 'type': 'int', 'value': 'duration', 'description': 'The duration (in minutes) for the item.'},
{'name': 'Duration (sec)', 'type': 'int', 'value': 'duration_sec', 'description': 'The duration (in seconds) for the item.'},
{'name': 'Duration (ms)', 'type': 'int', 'value': 'duration_ms', 'description': 'The duration (in milliseconds) for the item.'},
{'name': 'Duration Time', 'type': 'str', 'value': 'duration_time', 'description': 'The duration (in time format) for the item.'},
{'name': 'Poster URL', 'type': 'str', 'value': 'poster_url', 'description': 'A URL for the movie, TV show, or album poster.'},
{'name': 'Plex ID', 'type': 'str', 'value': 'plex_id', 'description': 'The Plex ID for the item.', 'example': 'e.g. 5d7769a9594b2b001e6a6b7e'},
{'name': 'Plex URL', 'type': 'str', 'value': 'plex_url', 'description': 'The Plex URL to your server for the item.'},

View file

@ -1155,6 +1155,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
'duration': duration,
'duration_sec': duration_sec,
'duration_ms': notify_params['duration'],
'druation_time': arrow.get(duration_sec).format(duration_format),
'poster_title': notify_params['poster_title'],
'poster_url': notify_params['poster_url'],
'plex_id': notify_params['plex_id'],