mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
parent
cfdb6975f0
commit
9fe58a6d86
2 changed files with 6 additions and 0 deletions
|
@ -381,6 +381,8 @@ NOTIFICATION_PARAMETERS = [
|
||||||
'category': 'Stream Details',
|
'category': 'Stream Details',
|
||||||
'parameters': [
|
'parameters': [
|
||||||
{'name': 'Streams', 'type': 'int', 'value': 'streams', 'description': 'The total number of concurrent streams.'},
|
{'name': 'Streams', 'type': 'int', 'value': 'streams', 'description': 'The total number of concurrent streams.'},
|
||||||
|
{'name': 'LAN Streams', 'type': 'int', 'value': 'lan_streams', 'description': 'The total number of concurrent LAN streams.'},
|
||||||
|
{'name': 'WAN Streams', 'type': 'int', 'value': 'wan_streams', 'description': 'The total number of concurrent WAN streams.'},
|
||||||
{'name': 'Direct Plays', 'type': 'int', 'value': 'direct_plays', 'description': 'The total number of concurrent direct plays.'},
|
{'name': 'Direct Plays', 'type': 'int', 'value': 'direct_plays', 'description': 'The total number of concurrent direct plays.'},
|
||||||
{'name': 'Direct Streams', 'type': 'int', 'value': 'direct_streams', 'description': 'The total number of concurrent direct streams.'},
|
{'name': 'Direct Streams', 'type': 'int', 'value': 'direct_streams', 'description': 'The total number of concurrent direct streams.'},
|
||||||
{'name': 'Transcodes', 'type': 'int', 'value': 'transcodes', 'description': 'The total number of concurrent transcodes.'},
|
{'name': 'Transcodes', 'type': 'int', 'value': 'transcodes', 'description': 'The total number of concurrent transcodes.'},
|
||||||
|
|
|
@ -624,6 +624,8 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
|
||||||
|
|
||||||
stream_count = len(sessions)
|
stream_count = len(sessions)
|
||||||
user_stream_count = len(user_sessions)
|
user_stream_count = len(user_sessions)
|
||||||
|
lan_streams = sum(1 for s in sessions if s['location'] == 'lan')
|
||||||
|
wan_streams = stream_count - lan_streams
|
||||||
|
|
||||||
lan_bandwidth = sum(helpers.cast_to_int(s['bandwidth']) for s in sessions if s['location'] == 'lan')
|
lan_bandwidth = sum(helpers.cast_to_int(s['bandwidth']) for s in sessions if s['location'] == 'lan')
|
||||||
wan_bandwidth = sum(helpers.cast_to_int(s['bandwidth']) for s in sessions if s['location'] != 'lan')
|
wan_bandwidth = sum(helpers.cast_to_int(s['bandwidth']) for s in sessions if s['location'] != 'lan')
|
||||||
|
@ -989,6 +991,8 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
|
||||||
'utctime': helpers.utc_now_iso(),
|
'utctime': helpers.utc_now_iso(),
|
||||||
# Stream parameters
|
# Stream parameters
|
||||||
'streams': stream_count,
|
'streams': stream_count,
|
||||||
|
'lan_streams': lan_streams,
|
||||||
|
'wan_streams': wan_streams,
|
||||||
'direct_plays': transcode_decision_count['direct play'],
|
'direct_plays': transcode_decision_count['direct play'],
|
||||||
'direct_streams': transcode_decision_count['copy'],
|
'direct_streams': transcode_decision_count['copy'],
|
||||||
'transcodes': transcode_decision_count['transcode'],
|
'transcodes': transcode_decision_count['transcode'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue