From 8807e80d0a04cf0c13a2113fab9917065cb0fdd9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 20 Dec 2014 01:06:27 -0500 Subject: start using user policy --- .../Library/Resolvers/TV/SeriesResolver.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers/TV') diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index 866dc534d5..00bed40868 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -53,13 +53,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV if (args.IsDirectory) { // Avoid expensive tests against VF's and all their children by not allowing this - if (args.Parent == null || args.Parent.IsRoot) - { - return null; - } - - // Optimization to avoid running these tests against Seasons - if (args.HasParent() || args.HasParent() || args.HasParent() || args.HasParent()) + if (args.Parent.IsRoot) { return null; } @@ -69,8 +63,12 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV var isTvShowsFolder = string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase); // If there's a collection type and it's not tv, it can't be a series - if (!string.IsNullOrEmpty(collectionType) && - !isTvShowsFolder) + if (!isTvShowsFolder) + { + return null; + } + + if (args.HasParent() || args.HasParent()) { return null; } -- cgit v1.2.3