fix(replication): fix replication on some cases of downloading
This commit is contained in:
parent
545f772918
commit
72828b860f
@ -136,6 +136,7 @@ module.exports = async ({
|
||||
const peer = p2p.find(options.peer)
|
||||
if(!peer)
|
||||
{
|
||||
console.log('dont found requested peer in peers')
|
||||
callback(undefined)
|
||||
return;
|
||||
}
|
||||
@ -532,7 +533,7 @@ module.exports = async ({
|
||||
const peer = { address: socket.remoteAddress, port: socket.remotePort }
|
||||
remote = remote.map(torrent => Object.assign(torrent, {peer}))
|
||||
}
|
||||
send('remoteTopTorrents', {torrents: remote, type, time: navigation && navigation.time})
|
||||
send('remoteTopTorrents', {torrents: mergeTorrentsWithDownloads(remote), type, time: navigation && navigation.time})
|
||||
})
|
||||
}));
|
||||
|
||||
|
@ -456,6 +456,10 @@ setInterval(() => {
|
||||
delete torrent.contenttype;
|
||||
}
|
||||
|
||||
// clean download info if added
|
||||
if(torrent.download)
|
||||
delete torrent.download
|
||||
|
||||
if(!checkTorrent(torrent))
|
||||
{
|
||||
resolve()
|
||||
|
Loading…
Reference in New Issue
Block a user