denormalize series fields

This commit is contained in:
Luke Pulverenti
2016-07-04 16:11:30 -04:00
parent 46dc02705a
commit 26036837dd
8 changed files with 89 additions and 50 deletions

View File

@@ -17,8 +17,14 @@ namespace MediaBrowser.Controller.Entities
}
}
[IgnoreDataMember]
public string SeriesName { get; set; }
public string FindSeriesName()
{
return SeriesName;
}
public override bool CanDownload()
{
var locationType = LocationType;

View File

@@ -7,6 +7,8 @@ namespace MediaBrowser.Controller.Entities
/// Gets the name of the series.
/// </summary>
/// <value>The name of the series.</value>
string SeriesName { get; }
string SeriesName { get; set; }
string FindSeriesName();
}
}

View File

@@ -25,11 +25,11 @@ namespace MediaBrowser.Controller.Entities.TV
public List<Guid> RemoteTrailerIds { get; set; }
public List<MediaUrl> RemoteTrailers { get; set; }
/// <summary>
/// Gets the season in which it aired.
/// </summary>
/// <value>The aired season.</value>
public int? AirsBeforeSeasonNumber { get; set; }
/// <summary>
/// Gets the season in which it aired.
/// </summary>
/// <value>The aired season.</value>
public int? AirsBeforeSeasonNumber { get; set; }
public int? AirsAfterSeasonNumber { get; set; }
public int? AirsBeforeEpisodeNumber { get; set; }
@@ -166,13 +166,21 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
public string SeriesName
{
get
{
var series = Series;
return series == null ? null : series.Name;
}
public string SeriesName { get; set; }
[IgnoreDataMember]
public string SeasonName { get; set; }
public string FindSeasonName()
{
var season = Season;
return season == null ? SeasonName : season.Name;
}
public string FindSeriesName()
{
var series = Series;
return series == null ? SeriesName : series.Name;
}
/// <summary>

View File

@@ -235,13 +235,12 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
public string SeriesName
public string SeriesName { get; set; }
public string FindSeriesName()
{
get
{
var series = Series;
return series == null ? null : series.Name;
}
var series = Series;
return series == null ? SeriesName : series.Name;
}
/// <summary>