[scraper] updates seeders only when providers the same

This commit is contained in:
TheBeastLT
2020-04-12 21:00:07 +02:00
parent de0fc88cf3
commit 59b7536cde

View File

@@ -91,7 +91,7 @@ async function updateTorrentSeeders(torrent) {
return repository.getTorrent(torrent)
.catch(() => undefined)
.then(stored => {
if (stored) {
if (stored && (!torrent.provider || torrent.provider === stored.provider)) {
stored.seeders = torrent.seeders;
stored.changed('updatedAt', true);
return stored.save()