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
path: root/bin
diff options
context:
space:
mode:
authoropfl <openthefrog@gmail.com>2014-11-03 00:37:24 +0300
committeropfl <openthefrog@gmail.com>2014-11-03 00:37:24 +0300
commit8cf42a316711fd98600fad841f1fea02550ff697 (patch)
tree02a257ad821925c4a6e00bd29ebfdfbd8407de96 /bin
parent9416b0b430f9acaece2df11f8548b412307efe8f (diff)
Added command to override default tmp path
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmd.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index 4c7a19d..af8eb80 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -30,6 +30,7 @@ var argv = minimist(process.argv.slice(2), {
i: 'index',
n: 'no-quit',
r: 'remove',
+ d: 'default',
q: 'quiet',
h: 'help',
v: 'version'
@@ -94,6 +95,7 @@ if (argv.help || !torrentId) {
-i, --index stream a particular file from torrnet (by index)
-n, --no-quit do not quit webtorrent on vlc exit
-r, --remove remove downloaded files on exit
+ -d, --default [path] overrides the default tmp directory
-q, --quiet silence stdout
-h, --help display this help message
-v, --version print the current version
@@ -154,7 +156,7 @@ function remove (cb) {
client.destroy(cb)
}
-var torrent = client.add(torrentId)
+var torrent = client.add(torrentId, (argv.default ? { tmp: argv.default } : {}))
torrent.on('infoHash', function () {
function updateMetadata () {