mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Add LAN/WAN bandwidth to activity header
This commit is contained in:
parent
cf14fbc3f0
commit
48588f23bf
2 changed files with 18 additions and 3 deletions
|
@ -4440,7 +4440,9 @@ class WebInterface(object):
|
|||
counts = {'stream_count_direct_play': 0,
|
||||
'stream_count_direct_stream': 0,
|
||||
'stream_count_transcode': 0,
|
||||
'total_bandwidth': 0}
|
||||
'total_bandwidth': 0,
|
||||
'lan_bandwidth': 0,
|
||||
'wan_bandwidth': 0}
|
||||
|
||||
for s in result['sessions']:
|
||||
if s['transcode_decision'] == 'transcode':
|
||||
|
@ -4451,6 +4453,10 @@ class WebInterface(object):
|
|||
counts['stream_count_direct_play'] += 1
|
||||
|
||||
counts['total_bandwidth'] += helpers.cast_to_int(s['bandwidth'])
|
||||
if s['location'] == 'lan':
|
||||
counts['lan_bandwidth'] += helpers.cast_to_int(s['bandwidth'])
|
||||
elif s['location'] == 'wan':
|
||||
counts['wan_bandwidth'] += helpers.cast_to_int(s['bandwidth'])
|
||||
|
||||
result.update(counts)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue