fix(replication): fix partitial torrent adding

This commit is contained in:
Alexey Kasyanchuk 2018-06-22 22:56:53 +03:00
parent 5efb309dc1
commit 35157457c7

View File

@ -462,6 +462,13 @@ setInterval(() => {
const { filesList } = torrent const { filesList } = torrent
delete torrent.filesList; delete torrent.filesList;
if(!filesList || filesList.length == 0)
{
console.log('skip torrent', torrent.name, '- no filesList')
resolve()
return
}
torrent.id = torrentsId++; torrent.id = torrentsId++;
mysqlSingle.query("SELECT id FROM torrents WHERE hash = ?", torrent.hash, (err, single) => { mysqlSingle.query("SELECT id FROM torrents WHERE hash = ?", torrent.hash, (err, single) => {