]> granicus.if.org Git - transmission/commitdiff
(trunk web) #2992: "web client reports ratios of -1 and -2" -- fixed in trunk for...
authorCharles Kerr <charles@transmissionbt.com>
Sun, 28 Feb 2010 14:31:45 +0000 (14:31 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 28 Feb 2010 14:31:45 +0000 (14:31 +0000)
web/javascript/torrent.js

index aefea650c693fa591a39297c71fe25d1e58f1bf1..bdea7478ec1af8ff9a00415e9beb9f4653df986c 100644 (file)
@@ -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;