From 6247929a62790ececc76864acc75f7ac47ee18aa Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 3 Dec 2013 16:12:20 -0500 Subject: [PATCH] #643 - Support episodes directly in series folder --- MediaBrowser.Controller/Entities/TV/Episode.cs | 16 +--------------- MediaBrowser.Controller/Entities/TV/Series.cs | 10 ++++++++++ .../Library/Resolvers/TV/EpisodeResolver.cs | 9 ++++++--- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index 5eab1cae0..40b999b02 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -86,7 +86,7 @@ namespace MediaBrowser.Controller.Entities.TV { get { - return Season; + return FindParent(); } } @@ -178,20 +178,6 @@ namespace MediaBrowser.Controller.Entities.TV get { return _series ?? (_series = FindParent()); } } - /// - /// The _season - /// - private Season _season; - /// - /// This Episode's Season Instance - /// - /// The season. - [IgnoreDataMember] - public Season Season - { - get { return _season ?? (_season = FindParent()); } - } - /// /// This is the ending episode number for double episodes. /// diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index f3c7b088a..b4a3fc811 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -4,6 +4,7 @@ using MediaBrowser.Model.Entities; using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Runtime.Serialization; namespace MediaBrowser.Controller.Entities.TV @@ -100,5 +101,14 @@ namespace MediaBrowser.Controller.Entities.TV return args; } + + [IgnoreDataMember] + public bool ContainsEpisodesWithoutSeasonFolders + { + get + { + return Children.OfType