diff --git a/rtorrent.py b/rtorrent.py index 3c39eda..f809721 100644 --- a/rtorrent.py +++ b/rtorrent.py @@ -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) diff --git a/static/aberrant.js b/static/aberrant.js index 8c3e4fa..00c5d8c 100644 --- a/static/aberrant.js +++ b/static/aberrant.js @@ -16,7 +16,7 @@ function get_active_torrents() { html_str += '' + torrents[i].total_size_str + ''; html_str += '' + torrents[i].state + ''; html_str += '' + torrents[i].downrate_str + ''; - html_str += '' + torrents[i].down_percent + ''; + html_str += '' + torrents[i].down_percent + '%'; html_str += '' + torrents[i].eta_str + ''; html_str += '' + torrents[i].uprate_str + ''; html_str += '' + torrents[i].tracker + ''; diff --git a/templates/index.html b/templates/index.html index fe30179..36450b4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -30,7 +30,7 @@ {{ torrent.total_size_str }} {{ torrent.state }} {{ torrent.downrate_str }} - {{ torrent.down_percent }} + {{ torrent.down_percent }}% {{ torrent.eta_str }} {{ torrent.uprate_str }} {{ torrent.tracker }}