From b443d591a29bc18daea36a3871908a4c1c277990 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 Apr 2013 01:29:27 -0400 Subject: fixes #200 - MB3 Locking Folders for a long time --- MediaBrowser.Controller/Library/TVUtils.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'MediaBrowser.Controller/Library/TVUtils.cs') diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs index 6ddb1ba5fd..9181fe9e87 100644 --- a/MediaBrowser.Controller/Library/TVUtils.cs +++ b/MediaBrowser.Controller/Library/TVUtils.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.IO; +using System.IO; +using MediaBrowser.Controller.IO; using System; using System.Collections.Generic; using System.Linq; @@ -154,21 +155,21 @@ namespace MediaBrowser.Controller.Library /// The path. /// The file system children. /// true if [is series folder] [the specified path]; otherwise, false. - public static bool IsSeriesFolder(string path, IEnumerable fileSystemChildren) + public static bool IsSeriesFolder(string path, IEnumerable fileSystemChildren) { // A folder with more than 3 non-season folders in will not becounted as a series var nonSeriesFolders = 0; foreach (var child in fileSystemChildren) { - if (child.IsHidden || child.IsSystemFile) + if (child.Attributes.HasFlag(FileAttributes.Hidden) || child.Attributes.HasFlag(FileAttributes.System)) { continue; } - if (child.IsDirectory) + if (child.Attributes.HasFlag(FileAttributes.Directory)) { - if (IsSeasonFolder(child.Path)) + if (IsSeasonFolder(child.FullName)) { return true; } @@ -182,8 +183,8 @@ namespace MediaBrowser.Controller.Library } else { - if (EntityResolutionHelper.IsVideoFile(child.Path) && - !string.IsNullOrEmpty(EpisodeNumberFromFile(child.Path, false))) + if (EntityResolutionHelper.IsVideoFile(child.FullName) && + !string.IsNullOrEmpty(EpisodeNumberFromFile(child.FullName, false))) { return true; } -- cgit v1.2.3