diff --git a/src/Ombi.Store/Entities/EmbyEpisode.cs b/src/Ombi.Store/Entities/EmbyEpisode.cs index 97fdb09b1..89103c580 100644 --- a/src/Ombi.Store/Entities/EmbyEpisode.cs +++ b/src/Ombi.Store/Entities/EmbyEpisode.cs @@ -57,11 +57,5 @@ namespace Ombi.Store.Entities return content.OfType().FirstOrDefault( x => x.EmbyId == this.EmbySeries.EmbyId); } - - public override bool IsIn(IMediaServerContent content) - { - return content.Episodes.Cast().Any(x => x.EmbyId == this.EmbyId); - } - } } \ No newline at end of file diff --git a/src/Ombi.Store/Entities/JellyfinEpisode.cs b/src/Ombi.Store/Entities/JellyfinEpisode.cs index 1c0ac423e..5b105003c 100644 --- a/src/Ombi.Store/Entities/JellyfinEpisode.cs +++ b/src/Ombi.Store/Entities/JellyfinEpisode.cs @@ -58,10 +58,5 @@ namespace Ombi.Store.Entities return content.OfType().FirstOrDefault( x => x.JellyfinId == this.JellyfinSeries.JellyfinId); } - - public override bool IsIn(IMediaServerContent content) - { - return content.Episodes.Cast().Any(x => x.JellyfinId == this.JellyfinId); - } } } diff --git a/src/Ombi.Store/Entities/MediaServerContent.cs b/src/Ombi.Store/Entities/MediaServerContent.cs index 3bccfea06..df50efc86 100644 --- a/src/Ombi.Store/Entities/MediaServerContent.cs +++ b/src/Ombi.Store/Entities/MediaServerContent.cs @@ -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 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); + } } } \ No newline at end of file diff --git a/src/Ombi.Store/Entities/PlexEpisode.cs b/src/Ombi.Store/Entities/PlexEpisode.cs index ac482d7ac..02cfc8a07 100644 --- a/src/Ombi.Store/Entities/PlexEpisode.cs +++ b/src/Ombi.Store/Entities/PlexEpisode.cs @@ -28,11 +28,5 @@ namespace Ombi.Store.Entities return content.OfType().FirstOrDefault( x => x.Key == this.PlexSeries.Key); } - - public override bool IsIn(IMediaServerContent content) - { - return content.Episodes.Cast().Any(x => x.Key == this.Key); - } - } } \ No newline at end of file