diff --git a/scraper/lib/torrentEntries.js b/scraper/lib/torrentEntries.js index 39d7174..ea808e4 100644 --- a/scraper/lib/torrentEntries.js +++ b/scraper/lib/torrentEntries.js @@ -10,7 +10,7 @@ const { isPackTorrent } = require('./parseHelper') async function createTorrentEntry(torrent, overwrite = false) { const titleInfo = parse(torrent.title); - if (titleInfo.seasons && torrent.type === Type.MOVIE) { + if ((titleInfo.seasons || torrent.title.match(/\[\d+-\d+/)) && torrent.type === Type.MOVIE) { // sometimes series torrent might be put into movies category torrent.type = Type.SERIES; } diff --git a/scraper/lib/torrentFiles.js b/scraper/lib/torrentFiles.js index 4b54644..9a8a46e 100644 --- a/scraper/lib/torrentFiles.js +++ b/scraper/lib/torrentFiles.js @@ -21,9 +21,9 @@ 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.SERIES && metadata && metadata.type === Type.MOVIE) { - // it's actually a movie - torrent.type = Type.MOVIE; + if (torrent.type !== Type.ANIME && metadata && metadata.type !== torrent.type) { + // it's actually a movie/series + torrent.type = metadata.type; } if (torrent.type === Type.MOVIE && (!parsedTorrentName.seasons ||