mirror of
https://github.com/sct/overseerr.git
synced 2025-10-03 00:48:07 +02:00
fix: lookup movie by imdbid if tmdbid does not exits for plex movie agent (#711)
This commit is contained in:
@@ -89,6 +89,15 @@ class JobPlexSync {
|
|||||||
newMedia.tmdbId = Number(tmdbMatch);
|
newMedia.tmdbId = Number(tmdbMatch);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (newMedia.imdbId && !newMedia.tmdbId) {
|
||||||
|
const tmdbMovie = await this.tmdb.getMovieByImdbId({
|
||||||
|
imdbId: newMedia.imdbId,
|
||||||
|
});
|
||||||
|
newMedia.tmdbId = tmdbMovie.id;
|
||||||
|
}
|
||||||
|
if (!newMedia.tmdbId) {
|
||||||
|
throw new Error('Unable to find TMDB ID');
|
||||||
|
}
|
||||||
|
|
||||||
const has4k = metadata.Media.some(
|
const has4k = metadata.Media.some(
|
||||||
(media) => media.videoResolution === '4k'
|
(media) => media.videoResolution === '4k'
|
||||||
|
Reference in New Issue
Block a user