Add total bandwidth to activity header

This commit is contained in:
JonnyWong16 2017-12-31 17:13:38 -08:00
parent 5a14c229a1
commit bf7e432c0c
3 changed files with 31 additions and 13 deletions

View file

@ -4434,7 +4434,8 @@ class WebInterface(object):
counts = {'stream_count_direct_play': 0,
'stream_count_direct_stream': 0,
'stream_count_transcode': 0}
'stream_count_transcode': 0,
'total_bandwidth': 0}
for s in result['sessions']:
if s['transcode_decision'] == 'transcode':
@ -4444,6 +4445,8 @@ class WebInterface(object):
else:
counts['stream_count_direct_play'] += 1
counts['total_bandwidth'] += helpers.cast_to_int(s['bandwidth'])
result.update(counts)
return result