add debug log
This commit is contained in:
parent
9bf62ed135
commit
0734f4b4e0
2
index.js
2
index.js
|
@ -1,5 +1,6 @@
|
|||
var bencode = require('bencode')
|
||||
var BitField = require('bitfield')
|
||||
var debug = require('debug')('ut_metadata')
|
||||
var EventEmitter = require('events').EventEmitter
|
||||
var inherits = require('inherits')
|
||||
var sha1 = require('simple-sha1')
|
||||
|
@ -114,6 +115,7 @@ module.exports = function (metadata) {
|
|||
|
||||
ut_metadata.prototype.setMetadata = function (metadata) {
|
||||
if (this._metadataComplete) return true
|
||||
debug('set metadata')
|
||||
|
||||
// if full torrent dictionary was passed in, pull out just `info` key
|
||||
try {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"dependencies": {
|
||||
"bencode": "^0.7.0",
|
||||
"bitfield": "^1.0.1",
|
||||
"debug": "^2.2.0",
|
||||
"inherits": "^2.0.1",
|
||||
"simple-sha1": "^2.0.0"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue