From: Charles Kerr Date: Sun, 28 Feb 2010 14:31:45 +0000 (+0000) Subject: (trunk web) #2992: "web client reports ratios of -1 and -2" -- fixed in trunk for... X-Git-Tag: 1.92~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14beb6f5a39e0f967d449539a2d0db27682fd3c8;p=transmission (trunk web) #2992: "web client reports ratios of -1 and -2" -- fixed in trunk for 1.92. Thanks to Longinus00 for the patch. --- 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;