diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-01-05 08:48:23 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-01-05 08:56:05 +0300 |
commit | ffcd84f07bd161ac424e682a683b09d376eff331 (patch) | |
tree | 0005a1023cf720e98373b22aba57faa0800871f7 /index.js | |
parent | 5ab99cc2c2de446f3ddc39e47a20d5ca01ba99e5 (diff) |
client.seed: skip piece verification for performance
For https://github.com/feross/webtorrent/issues/235
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -149,7 +149,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 } + if (!opts.storageOpts) opts.storageOpts = {} + if (opts.tmp) opts.storageOpts.tmp = opts.tmp var torrent = new Torrent(torrentId, extend({ client: self }, opts)) self.torrents.push(torrent) @@ -192,6 +193,8 @@ WebTorrent.prototype.seed = function (input, opts, onseed) { opts = {} } if (!opts) opts = {} + if (!opts.storageOpts) opts.storageOpts = {} + opts.storageOpts.noVerify = true createTorrent.parseInput(input, opts, function (err, files) { if (err) return self.emit('error', err) |