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

Display reserved blocks in CLI #267

Merged
merged 2 commits into from Feb 17, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -453,12 +453,12 @@ function drawTorrent (torrent) {
var pieces = torrent.storage.pieces
for (var i = 0; i < pieces.length; i++) {
var piece = pieces[i]
if (piece.verified || piece.blocksWritten === 0) {
if (piece.verified || (piece.blocksWritten === 0 && !piece.blocks[0])) {
continue
}
var bar = ''
for (var j = 0; j < piece.blocks.length; j++) {
bar += piece.blocks[j] ? '{green:█}' : '{red:█}'
bar += piece.blocks[j] ? (piece.blocks[j] === 1 ? '{blue:█}' : '{green:█}') : '{red:█}'
}
clivas.line('{4+cyan:' + i + '} ' + bar)
linesremaining -= 1
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.