mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-07 14:25:47 +02:00
feat(announce): count user u/d speed by announce data, unit by second.
This commit is contained in:
@@ -465,6 +465,14 @@ exports.announce = function (req, res) {
|
||||
}
|
||||
}).exec();
|
||||
}
|
||||
|
||||
//write peer speed
|
||||
req.currentPeer.update({
|
||||
$set: {
|
||||
peer_uspeed: curru / config.meanTorrentConfig.announce.announceInterval * 1000,
|
||||
peer_dspeed: currd / config.meanTorrentConfig.announce.announceInterval * 1000
|
||||
}
|
||||
}).exec();
|
||||
}
|
||||
|
||||
//only add seed time for completed torrent
|
||||
|
||||
Reference in New Issue
Block a user