removed Season/SeasonProvider, updated dbBenchmark tests.

This commit is contained in:
kay.one 2011-06-03 18:56:53 -07:00
commit d3be516fb2
34 changed files with 317 additions and 485 deletions

View file

@ -6,7 +6,7 @@ using SubSonic.SqlGeneration.Schema;
namespace NzbDrone.Core.Repository
{
public class Episode
public class Episode
{
[SubSonicPrimaryKey]
public virtual int EpisodeId { get; set; }
@ -15,7 +15,6 @@ namespace NzbDrone.Core.Repository
public virtual int SeriesId { get; set; }
public virtual int EpisodeFileId { get; set; }
public virtual int SeasonId { get; set; }
public virtual int SeasonNumber { get; set; }
public virtual int EpisodeNumber { get; set; }
public virtual string Title { get; set; }
@ -56,10 +55,9 @@ namespace NzbDrone.Core.Repository
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
var season = Season;
if (Ignored || (season != null && !season.Monitored)) return EpisodeStatusType.Ignored;
if (Ignored) return EpisodeStatusType.Ignored;
if (AirDate.Date.Year > 1900 && DateTime.Now.Date >= AirDate.Date)
{
return EpisodeStatusType.Missing;
@ -69,9 +67,6 @@ namespace NzbDrone.Core.Repository
}
}
[SubSonicToOneRelation(ThisClassContainsJoinKey = true)]
public virtual Season Season { get; set; }
[SubSonicToOneRelation(ThisClassContainsJoinKey = true)]
public virtual Series Series { get; set; }

View file

@ -11,6 +11,7 @@ namespace NzbDrone.Core.Repository
public virtual int EpisodeFileId { get; set; }
public virtual int SeriesId { get; set; }
public virtual int SeasonNumber { get; set; }
public string Path { get; set; }
public QualityTypes Quality { get; set; }
public bool Proper { get; set; }

View file

@ -16,8 +16,6 @@ namespace NzbDrone.Core.Repository.Quality
[DisplayFormat(ConvertEmptyStringToNull = false)]
public string Name { get; set; }
public bool UserProfile { get; set; } //Allows us to tell the difference between default and user profiles
[SubSonicIgnore]
[DisplayName("Allowed Qualities")]
public List<QualityTypes> Allowed { get; set; }

View file

@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
using SubSonic.SqlGeneration.Schema;
namespace NzbDrone.Core.Repository
{
public class Season
{
[SubSonicPrimaryKey(false)]
public virtual int SeasonId { get; set; }
public virtual int SeriesId { get; set; }
public virtual int SeasonNumber { get; set; }
public bool Monitored { get; set; }
public DayOfWeek? LastInfoSync { get; set; }
public DayOfWeek? LastDiskSync { get; set; }
[SubSonicToManyRelation]
public virtual IList<Episode> Episodes { get; set; }
[SubSonicToOneRelation(ThisClassContainsJoinKey = true)]
public virtual Series Series { get; set; }
}
}

View file

@ -56,9 +56,6 @@ namespace NzbDrone.Core.Repository
[SubSonicToOneRelation(ThisClassContainsJoinKey = true, JoinKeyName = "QualityProfileId")]
public virtual QualityProfile QualityProfile { get; set; }
[SubSonicToManyRelation]
public virtual IList<Season> Seasons { get; protected set; }
[SubSonicToManyRelation]
public virtual IList<Episode> Episodes { get; set; }