mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] handles torrent files from object without index
This commit is contained in:
@@ -71,7 +71,13 @@ async function reapplyEpisodeDecomposing(infoHash, includeSourceFiles = true) {
|
||||
const kitsuId = undefined;
|
||||
const imdbId = kitsuId
|
||||
? undefined
|
||||
: mostCommonValue(storedFiles.map(file => file.imdbId)) || await getImdbId(parse(torrent.title));
|
||||
: mostCommonValue(storedFiles.map(file => file.imdbId))
|
||||
|| await getImdbId(parse(torrent.title)).catch(() => undefined);
|
||||
|
||||
if (!imdbId && !kitsuId) {
|
||||
console.log(`imdbId or kitsuId not found: ${torrent.provider} ${torrent.title}`);
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return parseTorrentFiles({ ...torrent.get(), imdbId, kitsuId, files })
|
||||
.then(torrentContents => torrentContents.videos)
|
||||
|
||||
Reference in New Issue
Block a user