feat(p2p): show torrents number of other clients

This commit is contained in:
Alexey Kasyanchuk
2018-03-30 22:27:31 +03:00
parent 7952c283ef
commit 2ba49380f6
5 changed files with 43 additions and 14 deletions

View File

@ -461,7 +461,10 @@ module.exports = ({
if(typeof callback != 'function')
return;
callback(p2p.size)
callback({
size: p2p.size,
torrents: p2p.peersList().reduce((a, b) => (a.info ? a.info.torrents || 0 : 0) + (b.info ? b.info.torrents || 0 : 0), 0)
})
});
recive('p2pStatus', (callback) =>