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 05:48:15 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-03-20 05:48:15 +0300
commitc132ce47c9146738a0e7a5700aa93409b680b524 (patch)
tree2a674a9dad5ff0b9f50f600daf664ee3b14997b3 /index.js
parentc254fda44c7d498f08b73e134b7994f0394a9e29 (diff)
internal: simplify how storage opts are passed
Diffstat (limited to 'index.js')
-rw-r--r--index.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/index.js b/index.js
index c3628f5..04b5989 100644
--- a/index.js
+++ b/index.js
@@ -154,9 +154,6 @@ WebTorrent.prototype.download = function (torrentId, opts, ontorrent) {
opts.client = self
opts.storage = opts.storage || self.storage
- if (!opts.storageOpts) opts.storageOpts = {}
- if (opts.tmp) opts.storageOpts.tmp = opts.tmp
-
var torrent = new Torrent(torrentId, opts)
self.torrents.push(torrent)
@@ -200,8 +197,7 @@ WebTorrent.prototype.seed = function (input, opts, onseed) {
opts = {}
}
if (!opts) opts = {}
- if (!opts.storageOpts) opts.storageOpts = {}
- opts.storageOpts.noVerify = true
+ opts.noVerify = true
createTorrent.parseInput(input, opts, function (err, files) {
if (err) return self.emit('error', err)