Skip to content

Commit

Permalink
Sort peers displayed by downloadSpeed
Browse files Browse the repository at this point in the history
  • Loading branch information
clkao committed May 16, 2015
1 parent 1d54f5b commit 1973855
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ var ontorrent = function (torrent) {
clivas.line('')
linesremaining -= 9

wires.every(function (wire) {
wires.sort(function(a,b) { return b.downloadSpeed() - a.downloadSpeed() }).every(function (wire) {
var tags = []
if (wire.peerChoking) tags.push('choked')
clivas.line('{25+magenta:' + wire.peerAddress + '} {10:' + bytes(wire.downloaded) + '} {10 + cyan:' + bytes(wire.downloadSpeed()) + '/s} {15 + grey:' + tags.join(', ') + '} ')
Expand Down

0 comments on commit 1973855

Please sign in to comment.