diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-03-20 04:50:56 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-03-20 04:50:56 +0300 |
commit | 86045c6604a7c4784d528a79526b7f8d888ef690 (patch) | |
tree | 4e919a37b1878d7a1acc45778fb3feced81f9dc9 | |
parent | 525eef74dfa76485ef762b4a70deb0bf842c098f (diff) |
cli: seed: print magnetURI
-rwxr-xr-x | bin/cmd.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -437,7 +437,7 @@ function runSeed (input) { client.seed(input) client.on('torrent', function (torrent) { - console.log(torrent.magnetURI) + if (argv.quiet) console.log(torrent.magnetURI) drawTorrent(torrent) }) } @@ -468,8 +468,14 @@ function drawTorrent (torrent) { if (server) clivas.line('{green:server running at} {bold:' + href + '}') if (argv.out) clivas.line('{green:downloading to} {bold:' + argv.out + '}') + var seeding = torrent.storage.done + clivas.line('') - clivas.line('{green:downloading:} {bold:' + torrent.name + '}') + clivas.line( + '{green:' + (seeding ? 'seeding' : 'downloading') + ':} ' + + '{bold:' + torrent.name + '}' + ) + if (seeding) clivas.line('{green:magnet uri:} ' + torrent.magnetURI) clivas.line( '{green:speed: }{bold:' + prettyBytes(speed) + '/s} ' + '{green:downloaded:} {bold:' + prettyBytes(torrent.swarm.downloaded) + '}' + |