fix: Support duplicates in Emby/JF collections (#4902)

Support same movie that belongs in different collections
in Emby or Jellyfin
pull/4907/head
sephrat 2 years ago committed by GitHub
parent c262b7c22b
commit 141f96da5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save