mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] filter non mapped horriblesubs episodes
This commit is contained in:
@@ -135,7 +135,7 @@ async function _parseShowData(showData) {
|
|||||||
return kitsuIdsMapping[episode].kitsuId;
|
return kitsuIdsMapping[episode].kitsuId;
|
||||||
} else if (Array.isArray(kitsuId)) {
|
} else if (Array.isArray(kitsuId)) {
|
||||||
console.warn(`Unmapped episode number for ${showData.title} - ${inputEpisode}`);
|
console.warn(`Unmapped episode number for ${showData.title} - ${inputEpisode}`);
|
||||||
return kitsuId[kitsuId.length - 1];
|
return undefined;
|
||||||
}
|
}
|
||||||
return kitsuId;
|
return kitsuId;
|
||||||
};
|
};
|
||||||
@@ -155,6 +155,7 @@ async function _parseShowData(showData) {
|
|||||||
uploadDate: episodeInfo.uploadDate,
|
uploadDate: episodeInfo.uploadDate,
|
||||||
})))
|
})))
|
||||||
.reduce((a, b) => a.concat(b), [])
|
.reduce((a, b) => a.concat(b), [])
|
||||||
|
.filter((incompleteTorrent) => incompleteTorrent.kitsuId)
|
||||||
.map((incompleteTorrent) => entryLimiter.schedule(() => checkIfExists(incompleteTorrent)
|
.map((incompleteTorrent) => entryLimiter.schedule(() => checkIfExists(incompleteTorrent)
|
||||||
.then((torrent) => torrent && updateCurrentSeeders(torrent))
|
.then((torrent) => torrent && updateCurrentSeeders(torrent))
|
||||||
.then((torrent) => torrent && parseTorrentFiles(torrent)
|
.then((torrent) => torrent && parseTorrentFiles(torrent)
|
||||||
|
|||||||
Reference in New Issue
Block a user