mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] updates seeders only when providers the same
This commit is contained in:
@@ -91,7 +91,7 @@ async function updateTorrentSeeders(torrent) {
|
|||||||
return repository.getTorrent(torrent)
|
return repository.getTorrent(torrent)
|
||||||
.catch(() => undefined)
|
.catch(() => undefined)
|
||||||
.then(stored => {
|
.then(stored => {
|
||||||
if (stored) {
|
if (stored && (!torrent.provider || torrent.provider === stored.provider)) {
|
||||||
stored.seeders = torrent.seeders;
|
stored.seeders = torrent.seeders;
|
||||||
stored.changed('updatedAt', true);
|
stored.changed('updatedAt', true);
|
||||||
return stored.save()
|
return stored.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user