update comando api

This commit is contained in:
TheBeastLT
2021-09-16 08:45:16 +02:00
committed by TheBeastLT
parent 36f6eed9dc
commit efc433f462
6 changed files with 23 additions and 14 deletions

View File

@@ -72,7 +72,7 @@ async function processTorrentRecord(foundTorrent) {
if (!Number.isInteger(foundTorrent.seeders)) {
await updateCurrentSeeders(foundTorrent);
}
if (!foundTorrent.imdbId) {
if (!foundTorrent.imdbId && foundTorrent.originalName) {
const info = { title: foundTorrent.originalName, year: foundTorrent.year };
foundTorrent.imdbId = await getImdbId(info, TYPE_MAPPING[foundTorrent.category]).catch(() => undefined);
}