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:
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 /index.js
parent9416b0b430f9acaece2df11f8548b412307efe8f (diff)
Added command to override default tmp path
Diffstat (limited to 'index.js')
-rw-r--r--index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.js b/index.js
index 3ad617b..e8404cd 100644
--- a/index.js
+++ b/index.js
@@ -144,6 +144,8 @@ WebTorrent.prototype.download = function (torrentId, opts, ontorrent) {
opts.client = self
opts.storage = opts.storage || self.storage
+ if(opts.tmp) opts.storageOpts = { tmp: opts.tmp };
+
var torrent = new Torrent(torrentId, extend({ client: self }, opts))
self.torrents.push(torrent)