Show Gbps bandwidth

This commit is contained in:
JonnyWong16 2020-02-17 12:00:00 -08:00
parent fa0b547b32
commit f3d42e7b53
2 changed files with 9 additions and 5 deletions

View file

@ -330,7 +330,9 @@ DOCUMENTATION :: END
% if data['media_type'] != 'photo' and data['bandwidth'] != 'Unknown':
<%
bw = helpers.cast_to_int(data['bandwidth'])
if bw > 1000:
if bw > 1000000:
bw = str(round(bw / 1000000.0, 1)) + ' Gbps'
elif bw > 1000:
bw = str(round(bw / 1000.0, 1)) + ' Mbps'
else:
bw = str(bw) + ' kbps'