modify speed modifiers to be the same as the ones in common.py
This commit is contained in:
parent
1566091dd9
commit
0d1fe3370a
@ -53,8 +53,7 @@ Deluge.Events = {
|
|||||||
|
|
||||||
Deluge.Formatters = {
|
Deluge.Formatters = {
|
||||||
size: function(bytes) {
|
size: function(bytes) {
|
||||||
if (bytes < 1024) { return bytes.toFixed(1) + ' B'; }
|
bytes = bytes / 1024.0;
|
||||||
else { bytes = bytes / 1024; }
|
|
||||||
|
|
||||||
if (bytes < 1024) { return bytes.toFixed(1) + ' KiB'; }
|
if (bytes < 1024) { return bytes.toFixed(1) + ' KiB'; }
|
||||||
else { bytes = bytes / 1024; }
|
else { bytes = bytes / 1024; }
|
||||||
@ -66,14 +65,7 @@ Deluge.Formatters = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
speed: function(bits) {
|
speed: function(bits) {
|
||||||
if (!bits || bits == 0) return '';
|
return fsize(bits) + '/s'
|
||||||
if (bits < 1024) { return bits.toFixed(1) + ' b/s'; }
|
|
||||||
else { bits = bits / 1024; }
|
|
||||||
|
|
||||||
if (bits < 1024) { return bits.toFixed(1) + ' KiB/s'; }
|
|
||||||
else { bits = bits / 1024; }
|
|
||||||
|
|
||||||
return bits.toFixed(2) + ' MiB/s'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
timeRemaining: function(time) {
|
timeRemaining: function(time) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user