From 959c6a397cf9bb7c5494e8bb04d9b8f7dff40383 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 9 Jul 2016 13:39:04 -0400 Subject: add new streambuilder options --- .../Library/Resolvers/TV/EpisodeResolver.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs') diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs index 6d0f4ffe29..7b8832c594 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs @@ -30,22 +30,24 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV return null; } + var season = parent as Season; + // Just in case the user decided to nest episodes. + // Not officially supported but in some cases we can handle it. + if (season == null) + { + season = parent.GetParents().OfType().FirstOrDefault(); + } + // If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something // Also handle flat tv folders - if (string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) + if (season != null || + string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) || + args.HasParent()) { var episode = ResolveVideo(args, false); if (episode != null) { - var season = parent as Season; - // Just in case the user decided to nest episodes. - // Not officially supported but in some cases we can handle it. - if (season == null) - { - season = parent.GetParents().OfType().FirstOrDefault(); - } - var series = parent as Series; if (series == null) { -- cgit v1.2.3