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 `torrent.magnetURI` getter function #225

Merged
merged 4 commits into from Dec 30, 2014
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

Next

hide EventEmitter warnings when not in debug mode

  • Loading branch information
feross committed Dec 30, 2014
commit 6f8c5429ae8c0be5769d4c29e33f763bdbe9849f
@@ -12,7 +12,6 @@ var inherits = require('inherits')
var MultiStream = require('multistream')
var once = require('once')
var sha1 = require('git-sha1')
var stream = require('stream')

var BLOCK_LENGTH = 16 * 1024

@@ -33,6 +32,7 @@ inherits(Piece, EventEmitter)
function Piece (index, hash, buffer) {
var self = this
EventEmitter.call(self)
if (!debug.enabled) self.setMaxListeners(0)

self.index = index
self.hash = hash
@@ -185,6 +185,7 @@ inherits(File, EventEmitter)
function File (storage, file, pieces, pieceLength) {
var self = this
EventEmitter.call(self)
if (!debug.enabled) self.setMaxListeners(0)

self.storage = storage
self.name = file.name
@@ -278,6 +279,7 @@ inherits(Storage, EventEmitter)
function Storage (parsedTorrent, opts) {
var self = this
EventEmitter.call(self)
if (!debug.enabled) self.setMaxListeners(0)
opts = opts || {}

self.bitfield = new BitField(parsedTorrent.pieces.length)
@@ -43,6 +43,7 @@ inherits(Torrent, EventEmitter)
function Torrent (torrentId, opts) {
var self = this
EventEmitter.call(self)
if (!debug.enabled) self.setMaxListeners(0)
debug('new torrent')

self.client = opts.client
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.