mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-03-11 17:15:37 +00:00
[scraper] populate kitsuId for movies in series torrents
This commit is contained in:
parent
951add6851
commit
04b3d8a774
1 changed files with 10 additions and 7 deletions
|
|
@ -110,13 +110,16 @@ async function mapSeriesEpisode(file, torrent, files) {
|
|||
}
|
||||
|
||||
async function mapSeriesMovie(file, torrent) {
|
||||
return findMovieImdbId(file).then((imdbId) => [{
|
||||
infoHash: torrent.infoHash,
|
||||
fileIndex: file.fileIndex,
|
||||
title: file.path || file.name,
|
||||
size: file.size,
|
||||
imdbId: imdbId
|
||||
}])
|
||||
return findMovieImdbId(file)
|
||||
.then(imdbId => getMetadata(imdbId, Type.MOVIE).catch(() => ({ imdbId })))
|
||||
.then(metadata => [{
|
||||
infoHash: torrent.infoHash,
|
||||
fileIndex: file.fileIndex,
|
||||
title: file.path || file.name,
|
||||
size: file.size,
|
||||
imdbId: metadata.imdbId,
|
||||
kitsuId: metadata.kitsuId
|
||||
}]);
|
||||
}
|
||||
|
||||
function parseSeriesFile(file, parsedTorrentName) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue