Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-03-20 04:50:56 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-03-20 04:50:56 +0300
commit86045c6604a7c4784d528a79526b7f8d888ef690 (patch)
tree4e919a37b1878d7a1acc45778fb3feced81f9dc9
parent525eef74dfa76485ef762b4a70deb0bf842c098f (diff)
cli: seed: print magnetURI
-rwxr-xr-xbin/cmd.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index 7fa1dad..41fb203 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -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) + '}' +