aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-02-04 15:19:29 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-02-04 15:19:29 -0500
commit04d62d3420a2bbbf678ccb20e86938a4522e8097 (patch)
tree932c8a088df8fcf4f0f69cca004196911e5a50c9 /MediaBrowser.Controller/Entities
parent351cfef7a70ef311801be0bc9eb9e3891265d22b (diff)
convert episode providers to new system
Diffstat (limited to 'MediaBrowser.Controller/Entities')
-rw-r--r--MediaBrowser.Controller/Entities/TV/Episode.cs32
1 files changed, 17 insertions, 15 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs
index 61bf14543..3bdfc3c44 100644
--- a/MediaBrowser.Controller/Entities/TV/Episode.cs
+++ b/MediaBrowser.Controller/Entities/TV/Episode.cs
@@ -1,8 +1,8 @@
-using System;
+using MediaBrowser.Model.Configuration;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
-using MediaBrowser.Model.Configuration;
namespace MediaBrowser.Controller.Entities.TV
{
@@ -57,6 +57,12 @@ namespace MediaBrowser.Controller.Entities.TV
/// </summary>
/// <value>The absolute episode number.</value>
public int? AbsoluteEpisodeNumber { get; set; }
+
+ /// <summary>
+ /// This is the ending episode number for double episodes.
+ /// </summary>
+ /// <value>The index number.</value>
+ public int? IndexNumberEnd { get; set; }
/// <summary>
/// We want to group into series not show individually in an index
@@ -89,7 +95,7 @@ namespace MediaBrowser.Controller.Entities.TV
return value;
}
- var season = Parent as Season;
+ var season = Season;
return season != null ? season.IndexNumber : null;
}
@@ -141,24 +147,20 @@ namespace MediaBrowser.Controller.Entities.TV
}
/// <summary>
- /// The _series
- /// </summary>
- private Series _series;
- /// <summary>
/// This Episode's Series Instance
/// </summary>
/// <value>The series.</value>
[IgnoreDataMember]
public Series Series
{
- get { return _series ?? (_series = FindParent<Series>()); }
+ get { return FindParent<Series>(); }
}
- /// <summary>
- /// This is the ending episode number for double episodes.
- /// </summary>
- /// <value>The index number.</value>
- public int? IndexNumberEnd { get; set; }
+ [IgnoreDataMember]
+ public Season Season
+ {
+ get { return FindParent<Season>(); }
+ }
/// <summary>
/// Creates the name of the sort.
@@ -217,7 +219,7 @@ namespace MediaBrowser.Controller.Entities.TV
get
{
// First see if the parent is a Season
- var season = Parent as Season;
+ var season = Season;
if (season != null)
{
@@ -229,7 +231,7 @@ namespace MediaBrowser.Controller.Entities.TV
// Parent is a Series
if (seasonNumber.HasValue)
{
- var series = Parent as Series;
+ var series = Series;
if (series != null)
{