Some performance tweaks to speed up episode list view.

This commit is contained in:
kay.one 2011-05-28 23:58:24 -07:00
commit 18a20ff163
4 changed files with 11 additions and 33 deletions

View file

@ -49,15 +49,17 @@ namespace NzbDrone.Core.Repository
{
get
{
if (Ignored || (Season != null && !Season.Monitored)) return EpisodeStatusType.Ignored;
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
var season = Season;
if (Ignored || (season != null && !season.Monitored)) return EpisodeStatusType.Ignored;
if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now)
{
return EpisodeStatusType.Downloading;
}
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
if (AirDate.Date.Year > 1900 && DateTime.Now.Date >= AirDate.Date)
{
return EpisodeStatusType.Missing;