You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi.Store/Entities/PlexEpisode.cs

32 lines
931 B

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
namespace Ombi.Store.Entities
{
[Table("PlexEpisode")]
public class PlexEpisode : MediaServerEpisode
{
public string Key { get; set; } // RatingKey
/// <value>
/// The parent key.
/// </value>
public string ParentKey { get; set; }
/// <value>
/// The grandparent key.
/// </value>
public string GrandparentKey { get; set; }
[NotMapped]
public PlexServerContent PlexSeries
{
get => (PlexServerContent)Series;
set => Series = value;
}
public override IMediaServerContent SeriesIsIn(ICollection<IMediaServerContent> content)
{
return content.OfType<PlexServerContent>().FirstOrDefault(
x => x.Key == this.PlexSeries.Key);
}
}
}