|
|
|
@ -132,6 +132,17 @@ namespace Ombi.Schedule.Jobs.Jellyfin
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var existingTv = await _repo.GetByJellyfinId(tvShow.Id);
|
|
|
|
|
|
|
|
|
|
if (existingTv != null &&
|
|
|
|
|
( existingTv.ImdbId != tvShow.ProviderIds?.Imdb
|
|
|
|
|
|| existingTv.TheMovieDbId != tvShow.ProviderIds?.Tmdb
|
|
|
|
|
|| existingTv.TvDbId != tvShow.ProviderIds?.Tvdb))
|
|
|
|
|
{
|
|
|
|
|
_logger.LogDebug($"Series '{tvShow.Name}' has different IDs, probably a reidentification.");
|
|
|
|
|
await _repo.DeleteTv(existingTv);
|
|
|
|
|
existingTv = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (existingTv == null)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogDebug("Adding new TV Show {0}", tvShow.Name);
|
|
|
|
|