Skip to content

Commit

Permalink
fix(replication): fix replication on some cases of downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Jun 27, 2018
1 parent e73ca1c commit ac046d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/background/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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})
})
}));

Expand Down
4 changes: 4 additions & 0 deletions src/background/spider.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ setInterval(() => {
delete torrent.contenttype;
}

// clean download info if added
if(torrent.download)
delete torrent.download

if(!checkTorrent(torrent))
{
resolve()
Expand Down

0 comments on commit ac046d0

Please sign in to comment.