From 1c33177a63423b73ea7f74b2243b0e4a6ac238db Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Fri, 8 Feb 2008 18:47:21 +0000 Subject: [PATCH] torrent-index use '-' for unknown/empty values --- .../webui_plugin/templates/advanced/index.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/deluge/ui/webui/webui_plugin/templates/advanced/index.html b/deluge/ui/webui/webui_plugin/templates/advanced/index.html index 4ef2f996d..49d549185 100644 --- a/deluge/ui/webui/webui_plugin/templates/advanced/index.html +++ b/deluge/ui/webui/webui_plugin/templates/advanced/index.html @@ -100,19 +100,28 @@ $for torrent in torrent_list: $if (not get('category')): $torrent.category - $torrent.num_seeds ($torrent.total_seeds) - $torrent.num_peers ($torrent.total_peers) + + $if torrent.total_seeds != -1: + $torrent.num_seeds ($torrent.total_seeds) + $else: + - + + + $if torrent.total_peers != -1: + $torrent.num_peers ($torrent.total_peers) + $else: + - $if (torrent.download_rate): $fspeed(torrent.download_rate) $else: -   + - $if (torrent.upload_rate): $fspeed(torrent.upload_rate) $else: -   + - $ftime(torrent.eta) $("%.3f" % torrent.distributed_copies)