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-01-04 06:59:36 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-01-04 06:59:36 +0300
commit5c78cf25fe40f8b88680559ddbdbbc7a3f004a25 (patch)
treedadc1e265bb636fa044ca1980ad384f863064a49
parent09e345eb12f30f73e9492c7a6921a4442226e38e (diff)
remove concat-stream dep
-rw-r--r--lib/torrent.js7
-rw-r--r--package.json2
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index bf110f9..83cd358 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -1,7 +1,6 @@
module.exports = Torrent
var addrToIPPort = require('addr-to-ip-port') // browser exclude
-var concat = require('concat-stream') // browser exclude
var debug = require('debug')('webtorrent:torrent')
var Discovery = require('torrent-discovery')
var EventEmitter = require('events').EventEmitter
@@ -79,13 +78,13 @@ function Torrent (torrentId, opts) {
} else if (typeof get === 'function' && /^https?:/.test(torrentId)) {
// http or https url to torrent file
- get({
+ get.concat({
url: torrentId,
headers: { 'user-agent': 'WebTorrent (http://webtorrent.io)' }
- }, function (err, res) {
+ }, function (err, data) {
if (err)
return self.emit('error', new Error('error downloading torrent: ' + err.message))
- res.pipe(concat(onTorrentId))
+ onTorrentId(data)
})
} else if (typeof fs.readFile === 'function') {
diff --git a/package.json b/package.json
index 5c70f76..d160ca6 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,6 @@
"addr-to-ip-port": false,
"bittorrent-dht/client": false,
"bittorrent-swarm": "webtorrent-swarm",
- "concat-stream": false,
"load-ip-set": false,
"simple-get": false,
"ut_pex": false
@@ -38,7 +37,6 @@
"block-stream": "0.0.7",
"browserify-versionify": "^1.0.2",
"clivas": "^0.1.4",
- "concat-stream": "^1.4.6",
"create-torrent": "^3.4.0",
"debug": "^2.1.0",
"dezalgo": "^1.0.1",