[scraper] get torrent size for horriblesubs

This commit is contained in:
TheBeastLT
2020-04-02 20:58:08 +02:00
parent 6b36667b7f
commit db78f5873b
5 changed files with 71 additions and 16 deletions

View File

@@ -62,8 +62,9 @@ async function updateTorrentSeeders(torrent) {
return repository.getTorrent(torrent)
.catch(() => undefined)
.then(stored => {
if (stored && stored.seeders !== torrent.seeders) {
if (stored) {
stored.seeders = torrent.seeders;
stored.changed('updatedAt', true);
return stored.save()
}
})