[scraper] populate kitsuId for movies in series torrents

This commit is contained in:
TheBeastLT
2020-03-29 12:20:27 +02:00
parent 951add6851
commit 04b3d8a774

View File

@@ -110,13 +110,16 @@ async function mapSeriesEpisode(file, torrent, files) {
} }
async function mapSeriesMovie(file, torrent) { async function mapSeriesMovie(file, torrent) {
return findMovieImdbId(file).then((imdbId) => [{ return findMovieImdbId(file)
infoHash: torrent.infoHash, .then(imdbId => getMetadata(imdbId, Type.MOVIE).catch(() => ({ imdbId })))
fileIndex: file.fileIndex, .then(metadata => [{
title: file.path || file.name, infoHash: torrent.infoHash,
size: file.size, fileIndex: file.fileIndex,
imdbId: imdbId title: file.path || file.name,
}]) size: file.size,
imdbId: metadata.imdbId,
kitsuId: metadata.kitsuId
}]);
} }
function parseSeriesFile(file, parsedTorrentName) { function parseSeriesFile(file, parsedTorrentName) {