Radarr/NzbDrone.Core/Parser/Model/RemoteEpisode.cs

26 lines
682 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Parser.Model
{
public class RemoteEpisode
{
2013-09-13 23:17:58 +00:00
public ReleaseInfo Release { get; set; }
public ParsedEpisodeInfo ParsedEpisodeInfo { get; set; }
public Series Series { get; set; }
public List<Episode> Episodes { get; set; }
public Boolean DownloadAllowed { get; set; }
public bool IsRecentEpisode()
{
2013-09-01 18:30:54 +00:00
return Episodes.Any(e => e.AirDateUtc >= DateTime.UtcNow.Date.AddDays(-14));
}
2013-08-14 05:25:53 +00:00
public override string ToString()
{
2013-09-13 23:17:58 +00:00
return Release.Title;
2013-08-14 05:25:53 +00:00
}
}
}