From a1809d1848d1215d8c957f988eb7affa1a964918 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Sun, 31 Jan 2021 23:02:16 +0100 Subject: [PATCH] [scraper] overwrite kickass provider torrents --- scraper/lib/torrentEntries.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scraper/lib/torrentEntries.js b/scraper/lib/torrentEntries.js index 24d7fc4..39d7174 100644 --- a/scraper/lib/torrentEntries.js +++ b/scraper/lib/torrentEntries.js @@ -100,6 +100,10 @@ async function checkAndUpdateTorrent(torrent) { if (!storedTorrent) { return false; } + if (storedTorrent.provider === 'KickassTorrents' && torrent.provider) { + storedTorrent.provider = torrent.provider; + storedTorrent.torrentId = torrent.torrentId; + } return createTorrentContents({ ...storedTorrent.get(), torrentLink: torrent.torrentLink }) .then(() => updateTorrentSeeders(torrent)); }