Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file.getBuffer() API #230

Merged
merged 4 commits into from Jan 4, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

remove concat-stream dep

  • Loading branch information
feross committed Jan 4, 2015
commit 5c78cf25fe40f8b88680559ddbdbbc7a3f004a25
@@ -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') {
@@ -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",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.