From cd5fac2f609de73f854950cffc5af2e3d0a81604 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Sat, 2 May 2020 17:12:28 +0200 Subject: [PATCH] [scraper] upsert existing video --- scraper/lib/repository.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scraper/lib/repository.js b/scraper/lib/repository.js index 9a64284..f3a26a1 100644 --- a/scraper/lib/repository.js +++ b/scraper/lib/repository.js @@ -200,6 +200,9 @@ function setTorrentSeeders(infoHash, seeders) { } function createFile(file) { + if (file.id) { + return File.upsert(file); + } return File.create(file, { include: [Subtitle] }); }