From 14beb6f5a39e0f967d449539a2d0db27682fd3c8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 28 Feb 2010 14:31:45 +0000 Subject: [PATCH] (trunk web) #2992: "web client reports ratios of -1 and -2" -- fixed in trunk for 1.92. Thanks to Longinus00 for the patch. --- web/javascript/torrent.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/javascript/torrent.js b/web/javascript/torrent.js index aefea650c..bdea7478e 100644 --- a/web/javascript/torrent.js +++ b/web/javascript/torrent.js @@ -551,7 +551,12 @@ Torrent.prototype = c += ', uploaded '; c += Math.formatBytes( this._upload_total ); c += ' (Ratio '; - c += Math.round(this._upload_ratio*100)/100; + if(this._upload_ratio > -1) + c += Math.round(this._upload_ratio*100)/100; + else if(this._upload_ratio == -2) + c += 'Inf'; + else + c += '0'; c += ')'; progress_details = c; -- 2.40.0