fix eta sigfigs, add % sign to % column

This commit is contained in:
iou1name 2019-02-20 16:09:11 -05:00
parent 463ccdfcdf
commit 203c460210
3 changed files with 3 additions and 2 deletions

View File

@ -92,6 +92,7 @@ def size_units(rate):
def time_units(seconds):
"""Helper to convert seconds into more useful units."""
seconds = int(seconds)
if seconds > (24*60*60):
days = seconds // (24*60*60)
hours = (seconds % (24*60*60)) // (60*60)

View File

@ -16,7 +16,7 @@ function get_active_torrents() {
html_str += '<td class="totalSize">' + torrents[i].total_size_str + '</td>';
html_str += '<td class="state">' + torrents[i].state + '</td>';
html_str += '<td class="downrate">' + torrents[i].downrate_str + '</td>';
html_str += '<td class="downPercent">' + torrents[i].down_percent + '</td>';
html_str += '<td class="downPercent">' + torrents[i].down_percent + '%</td>';
html_str += '<td class="eta">' + torrents[i].eta_str + '</td>';
html_str += '<td class="uprate">' + torrents[i].uprate_str + '</td>';
html_str += '<td class="tracker">' + torrents[i].tracker + '</td>';

View File

@ -30,7 +30,7 @@
<td class="totalSize">{{ torrent.total_size_str }}</td>
<td class="state">{{ torrent.state }}</td>
<td class="downrate">{{ torrent.downrate_str }}</td>
<td class="downPercent">{{ torrent.down_percent }}</td>
<td class="downPercent">{{ torrent.down_percent }}%</td>
<td class="eta">{{ torrent.eta_str }}</td>
<td class="uprate">{{ torrent.uprate_str }}</td>
<td class="tracker">{{ torrent.tracker }}</td>