mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
fix: Support duplicates in Emby/JF collections (#4902)
Support same movie that belongs in different collections in Emby or Jellyfin
This commit is contained in:
parent
c262b7c22b
commit
141f96da5e
2 changed files with 12 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue