[scraper] populate kitsuId for movies in series torrents
This commit is contained in:
@@ -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)
|
||||||
|
.then(imdbId => getMetadata(imdbId, Type.MOVIE).catch(() => ({ imdbId })))
|
||||||
|
.then(metadata => [{
|
||||||
infoHash: torrent.infoHash,
|
infoHash: torrent.infoHash,
|
||||||
fileIndex: file.fileIndex,
|
fileIndex: file.fileIndex,
|
||||||
title: file.path || file.name,
|
title: file.path || file.name,
|
||||||
size: file.size,
|
size: file.size,
|
||||||
imdbId: imdbId
|
imdbId: metadata.imdbId,
|
||||||
}])
|
kitsuId: metadata.kitsuId
|
||||||
|
}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseSeriesFile(file, parsedTorrentName) {
|
function parseSeriesFile(file, parsedTorrentName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user