mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] fix type assignment if it's null in metadata
This commit is contained in:
@@ -21,7 +21,7 @@ async function parseTorrentFiles(torrent) {
|
|||||||
// if (metadata && metadata.type !== torrent.type && torrent.type !== Type.ANIME) {
|
// if (metadata && metadata.type !== torrent.type && torrent.type !== Type.ANIME) {
|
||||||
// throw new Error(`Mismatching entry type for ${torrent.name}: ${torrent.type}!=${metadata.type}`);
|
// 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
|
// it's actually a movie/series
|
||||||
torrent.type = metadata.type;
|
torrent.type = metadata.type;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user