diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-07-09 13:42:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-09 13:42:14 -0400 |
| commit | 628fddb56914d986908955a8d88f7463e343ca33 (patch) | |
| tree | bca887b7963377f98dd6e529aee5612e7109b9d7 /MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs | |
| parent | 3984f27027dbb94f4492850a948ca93cbe257f75 (diff) | |
| parent | 959c6a397cf9bb7c5494e8bb04d9b8f7dff40383 (diff) | |
Merge pull request #1933 from MediaBrowser/dev
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) { |
