Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple of changes to cmd.js #600

Closed
wants to merge 12 commits into from

Fixed style issues reported by Travis.

Signed-off-by: Vincent Frentzel <vincent@frentzel.eu>
  • Loading branch information
Vincent Frentzel
Vincent Frentzel committed Feb 7, 2016
commit bf799f819f2627d0c0c28c2404c93c40ee8434fd
@@ -543,11 +543,11 @@ function drawTorrent (torrent) {
'{green:Blocked peers:} {bold:' + torrent.numBlockedPeers + '} ' +
'{green:Hotswaps:} {bold:' + hotswaps + '}'
)

This comment has been minimized.

Copy link
@feross

feross Feb 7, 2016

Member

This is pretty advanced information. Why do you want to show it to all users?

line('')

if (argv.verbose) {
torrent.swarm.wires.every(function (wire) {
torrent.swarm.wires.every(function (wire) {
var progress = '?'
if (torrent.length) {
var bits = 0
@@ -559,7 +559,7 @@ function drawTorrent (torrent) {
}
progress = bits === piececount ? 'S' : Math.floor(100 * bits / piececount) + '%'
}

var str = '{3:%s} {25+magenta:%s} {10:%s} {12+cyan:%s/s} {12+red:%s/s}'
var args = [
progress,
@@ -570,26 +570,26 @@ function drawTorrent (torrent) {
prettyBytes(wire.downloadSpeed()),
prettyBytes(wire.uploadSpeed())
]

str += ' {15+grey:%s} {10+grey:%s}'
var tags = []
if (wire.requests.length > 0) tags.push(wire.requests.length + ' reqs')
if (wire.peerChoking) tags.push('choked')
var reqStats = wire.requests.map(function (req) { return req.piece })
args.push(tags.join(', '), reqStats.join(' '))

line.apply(undefined, [].concat(str, args))

peerslisted += 1
return linesRemaining > 4
})
if (torrent.numPeers > peerslisted) {

if (torrent.numPeers > peerslisted) {
line('{60:}')
line('... and %s more', torrent.numPeers - peerslisted)
}
line('{60:}')
}

line('{60:}')
}
clivas.flush(true)
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.