From 7f81f72a4751d0262397b865ba907ddeb5b79187 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Thu, 29 Apr 2021 11:23:50 +0200 Subject: [PATCH] [scraper] fix type assignment if it's null in metadata --- scraper/lib/torrentFiles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scraper/lib/torrentFiles.js b/scraper/lib/torrentFiles.js index 9a8a46e..c007228 100644 --- a/scraper/lib/torrentFiles.js +++ b/scraper/lib/torrentFiles.js @@ -21,7 +21,7 @@ async function parseTorrentFiles(torrent) { // if (metadata && metadata.type !== torrent.type && torrent.type !== Type.ANIME) { // throw new Error(`Mismatching entry type for ${torrent.name}: ${torrent.type}!=${metadata.type}`); // } - if (torrent.type !== Type.ANIME && metadata && metadata.type !== torrent.type) { + if (torrent.type !== Type.ANIME && metadata && metadata.type && metadata.type !== torrent.type) { // it's actually a movie/series torrent.type = metadata.type; }