fix: Support duplicates in Emby/JF collections

Support same movie that belongs in different collections
in Emby or Jellyfin
pull/4902/head
sephrat 1 year ago
parent c262b7c22b
commit 58d70453d4

@ -263,7 +263,12 @@ namespace Ombi.Schedule.Jobs.Emby
// 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())
{

@ -228,7 +228,12 @@ namespace Ombi.Schedule.Jobs.Jellyfin
// Check if it exists
var existingMovie = await _repo.GetByJellyfinId(movieInfo.Id);
var alreadyGoingToAdd = content.Any(x => 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())
{

Loading…
Cancel
Save