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

Output more details #188

Merged
merged 4 commits into from Nov 25, 2014
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

display pieces that are in progress

  • Loading branch information
astro committed Nov 22, 2014
commit 3a3d661499e79490b906cfe44ad0bee7c3d07afd
@@ -366,6 +366,23 @@ function onReady () {
clivas.line('{80:}')
linesremaining -= 8

var pieces = torrent.storage.pieces
var piecesBar = []
for(var i = 0; i < pieces.length; i++) {
var piece = pieces[i]
if (piece.verified || piece.blocksWritten === 0) {
continue;
}
var bar = ''
for(var j = 0; j < piece.blocks.length; j++) {
bar += piece.blocks[j] ? '{green:█}' : '{red:█}';
}
clivas.line('{4+cyan:' + i + '} ' + bar);
linesremaining -= 1
}
clivas.line('{80:}')
linesremaining -= 1

wires.every(function (wire) {
var tags = []
if (wire.peerChoking) tags.push('choked')
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.