diff --git a/src/Ombi.Schedule/Jobs/Emby/EmbyContentSync.cs b/src/Ombi.Schedule/Jobs/Emby/EmbyContentSync.cs index 35cc66be47..443c1c3da7 100644 --- a/src/Ombi.Schedule/Jobs/Emby/EmbyContentSync.cs +++ b/src/Ombi.Schedule/Jobs/Emby/EmbyContentSync.cs @@ -263,7 +263,12 @@ private async Task ProcessMovies(EmbyMovie movieInfo, ICollection c // Check if it exists var existingMovie = await _repo.GetByEmbyId(movieInfo.Id); var alreadyGoingToAdd = content.Any(x => x.EmbyId == movieInfo.Id); - if (existingMovie == null && !alreadyGoingToAdd) + if (alreadyGoingToAdd) + { + _logger.LogDebug($"Detected duplicate for {movieInfo.Name}"); + return; + } + if (existingMovie == null) { if (!movieInfo.ProviderIds.Any()) { diff --git a/src/Ombi.Schedule/Jobs/Jellyfin/JellyfinContentSync.cs b/src/Ombi.Schedule/Jobs/Jellyfin/JellyfinContentSync.cs index 58dacaed5a..3eab17a356 100644 --- a/src/Ombi.Schedule/Jobs/Jellyfin/JellyfinContentSync.cs +++ b/src/Ombi.Schedule/Jobs/Jellyfin/JellyfinContentSync.cs @@ -228,7 +228,12 @@ private async Task ProcessMovies(JellyfinMovie movieInfo, ICollection x.JellyfinId == movieInfo.Id); - if (existingMovie == null && !alreadyGoingToAdd) + if (alreadyGoingToAdd) + { + _logger.LogDebug($"Detected duplicate for {movieInfo.Name}"); + return; + } + if (existingMovie == null) { if (!movieInfo.ProviderIds.Any()) {