fix(torrents): fixed torrent upload and scrape status data on public mode issues.

This commit is contained in:
OldHawk
2017-10-22 20:55:53 +08:00
parent 821f2af391
commit 36deb6e3a4
2 changed files with 6 additions and 5 deletions

View File

@@ -135,10 +135,7 @@ module.exports.doScrape = function (t, cb) {
//});
server.on('message', function (msg, rinfo) {
var buf = new Buffer(msg),
seeders,
completed,
leechers;
var buf = new Buffer(msg);
//console.log(rinfo);
action = buf.readUInt32BE(0, 4);

View File

@@ -575,7 +575,11 @@ exports.create = function (req, res) {
//scrape torrent status info in public cms mode
if (!config.meanTorrentConfig.announce.privateTorrentCmsMode && config.meanTorrentConfig.scrapeTorrentStatus.onTorrentUpload) {
scrape.doScrape(torrent);
scrape.doScrape(torrent, function (err, result) {
if (err) {
mtDebug.debugRed(err);
}
});
}
}
});