diff options
author | grunjol <grunjol@argenteam.net> | 2015-02-16 01:09:52 +0300 |
---|---|---|
committer | grunjol <grunjol@argenteam.net> | 2015-02-16 01:09:52 +0300 |
commit | 5ab42fd4fd2d41589a851f81911a00c6b0c46d9f (patch) | |
tree | 39d2d3eb48cc28ec84bec9bd561e0b142c7c2f5a /bin | |
parent | e0af2a8c79f7cffa33ac0edc46fdbced84d8df22 (diff) |
show reserved blocks in cmd
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cmd.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -452,12 +452,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 |