mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
removed Season/SeasonProvider, updated dbBenchmark tests.
This commit is contained in:
parent
2ecd5ddb98
commit
d3be516fb2
34 changed files with 317 additions and 485 deletions
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
}
|
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue