mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 08:16:05 -07:00
fix(newsletter): Fix newsletter not publishing double episodes (#4495)
[skip ci]
This commit is contained in:
parent
86e87dad49
commit
ddf63fbed0
4 changed files with 5 additions and 20 deletions
|
@ -57,11 +57,5 @@ namespace Ombi.Store.Entities
|
|||
return content.OfType<EmbyContent>().FirstOrDefault(
|
||||
x => x.EmbyId == this.EmbySeries.EmbyId);
|
||||
}
|
||||
|
||||
public override bool IsIn(IMediaServerContent content)
|
||||
{
|
||||
return content.Episodes.Cast<EmbyEpisode>().Any(x => x.EmbyId == this.EmbyId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -58,10 +58,5 @@ namespace Ombi.Store.Entities
|
|||
return content.OfType<JellyfinContent>().FirstOrDefault(
|
||||
x => x.JellyfinId == this.JellyfinSeries.JellyfinId);
|
||||
}
|
||||
|
||||
public override bool IsIn(IMediaServerContent content)
|
||||
{
|
||||
return content.Episodes.Cast<JellyfinEpisode>().Any(x => x.JellyfinId == this.JellyfinId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Ombi.Store.Repository;
|
||||
using System.Linq;
|
||||
|
||||
namespace Ombi.Store.Entities
|
||||
{
|
||||
|
@ -42,6 +41,9 @@ namespace Ombi.Store.Entities
|
|||
public IMediaServerContent Series { get; set; }
|
||||
|
||||
public abstract IMediaServerContent SeriesIsIn(ICollection<IMediaServerContent> content);
|
||||
public abstract bool IsIn(IMediaServerContent content);
|
||||
public bool IsIn(IMediaServerContent content)
|
||||
{
|
||||
return content.Episodes.Any(x => x.SeasonNumber == this.SeasonNumber && x.EpisodeNumber == this.EpisodeNumber);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,11 +28,5 @@ namespace Ombi.Store.Entities
|
|||
return content.OfType<PlexServerContent>().FirstOrDefault(
|
||||
x => x.Key == this.PlexSeries.Key);
|
||||
}
|
||||
|
||||
public override bool IsIn(IMediaServerContent content)
|
||||
{
|
||||
return content.Episodes.Cast<PlexEpisode>().Any(x => x.Key == this.Key);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue