diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-07-09 13:39:04 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-07-09 13:39:04 -0400 |
| commit | 959c6a397cf9bb7c5494e8bb04d9b8f7dff40383 (patch) | |
| tree | 2f0b79c43302ec8fa026b3a2b2cbf01365a436ef /MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs | |
| parent | afaf7f7c5b39705d810b3e85b6f23a7d72f7106d (diff) | |
add new streambuilder options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs | 20 |
1 files changed, 11 insertions, 9 deletions
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<Season>().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<Series>()) { var episode = ResolveVideo<Episode>(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<Season>().FirstOrDefault(); - } - var series = parent as Series; if (series == null) { |
