aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/TVUtils.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-28 01:29:27 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-28 01:29:27 -0400
commitb443d591a29bc18daea36a3871908a4c1c277990 (patch)
tree9f671e0484c1b42bd5cecfe58a4d7cc3e7a6ddc7 /MediaBrowser.Controller/Library/TVUtils.cs
parent90bb3d46c416676105d5cf89d12279b3f7ccb944 (diff)
fixes #200 - MB3 Locking Folders for a long time
Diffstat (limited to 'MediaBrowser.Controller/Library/TVUtils.cs')
-rw-r--r--MediaBrowser.Controller/Library/TVUtils.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs
index 6ddb1ba5f..9181fe9e8 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
/// <param name="path">The path.</param>
/// <param name="fileSystemChildren">The file system children.</param>
/// <returns><c>true</c> if [is series folder] [the specified path]; otherwise, <c>false</c>.</returns>
- public static bool IsSeriesFolder(string path, IEnumerable<WIN32_FIND_DATA> fileSystemChildren)
+ public static bool IsSeriesFolder(string path, IEnumerable<FileSystemInfo> 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;
}