Backport pull request #12891 from jellyfin/release-10.10.z

Fix TMDB import failing when no IMDB ID is set for a movie

Original-merge: c6629aebf871af861b42f711f12ff920117f4bce

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
benedikt257 2024-11-03 10:55:48 -05:00 committed by Joshua M. Boniface
parent 725c414682
commit 600a09f1fc
2 changed files with 2 additions and 1 deletions

View File

@ -192,6 +192,7 @@
- [jaina heartles](https://github.com/heartles) - [jaina heartles](https://github.com/heartles)
- [oxixes](https://github.com/oxixes) - [oxixes](https://github.com/oxixes)
- [elfalem](https://github.com/elfalem) - [elfalem](https://github.com/elfalem)
- [benedikt257](https://github.com/benedikt257)
# Emby Contributors # Emby Contributors

View File

@ -198,7 +198,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
}; };
movie.SetProviderId(MetadataProvider.Tmdb, tmdbId); movie.SetProviderId(MetadataProvider.Tmdb, tmdbId);
movie.SetProviderId(MetadataProvider.Imdb, movieResult.ImdbId); movie.TrySetProviderId(MetadataProvider.Imdb, movieResult.ImdbId);
if (movieResult.BelongsToCollection is not null) if (movieResult.BelongsToCollection is not null)
{ {
movie.SetProviderId(MetadataProvider.TmdbCollection, movieResult.BelongsToCollection.Id.ToString(CultureInfo.InvariantCulture)); movie.SetProviderId(MetadataProvider.TmdbCollection, movieResult.BelongsToCollection.Id.ToString(CultureInfo.InvariantCulture));