mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Fix use float when rounding bitrate/bandwidth
This commit is contained in:
parent
aee752e04e
commit
da3abf11a2
1 changed files with 3 additions and 3 deletions
|
@ -207,19 +207,19 @@ DOCUMENTATION :: END
|
||||||
<div class="dashboard-activity-poster-info-ip-address">
|
<div class="dashboard-activity-poster-info-ip-address">
|
||||||
Quality:
|
Quality:
|
||||||
<%
|
<%
|
||||||
br = helpers.cast_to_int(data['stream_bitrate']) or "Unknown"
|
br = helpers.cast_to_float(data['stream_bitrate']) or "Unknown"
|
||||||
br_units = "kbps"
|
br_units = "kbps"
|
||||||
if br != "Unknown" and br > 1000:
|
if br != "Unknown" and br > 1000:
|
||||||
br = round(br / 1000, 1)
|
br = round(br / 1000, 1)
|
||||||
br_units = "Mbps"
|
br_units = "Mbps"
|
||||||
%>
|
%>
|
||||||
<span id="stream-quality-${data['session_key']}">${data['quality_profile']}</span> (<span id="stream-quality-bitrate-${data['session_key']}">${br}</span> <span id="stream-quality-bitrate-units-${data['session_key']}">${br_units}</span>)
|
<span id="stream-quality-${data['session_key']}">${data['quality_profile']}</span> (<span id="stream-quality-bitrate-${data['session_key']}">${br}</span> <span id="stream-quality-bitrate-units-${data['session_key']}">${br_units}</span>)
|
||||||
<br />
|
<br />
|
||||||
% if data['ip_address']:
|
% if data['ip_address']:
|
||||||
IP: ${data['ip_address']}
|
IP: ${data['ip_address']}
|
||||||
% if data['media_type'] != 'photo' and 'location' in data:
|
% if data['media_type'] != 'photo' and 'location' in data:
|
||||||
<%
|
<%
|
||||||
bw = helpers.cast_to_int(data['bandwidth']) or "Unknown"
|
bw = helpers.cast_to_float(data['bandwidth']) or "Unknown"
|
||||||
bw_units = "kbps"
|
bw_units = "kbps"
|
||||||
if bw != "Unknown" and bw > 1000:
|
if bw != "Unknown" and bw > 1000:
|
||||||
bw = round(bw / 1000, 1)
|
bw = round(bw / 1000, 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue