aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.TV/TVUtils.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.TV/TVUtils.cs')
-rw-r--r--MediaBrowser.TV/TVUtils.cs22
1 files changed, 4 insertions, 18 deletions
diff --git a/MediaBrowser.TV/TVUtils.cs b/MediaBrowser.TV/TVUtils.cs
index e44a3dd88..973b81a3c 100644
--- a/MediaBrowser.TV/TVUtils.cs
+++ b/MediaBrowser.TV/TVUtils.cs
@@ -53,10 +53,12 @@ namespace MediaBrowser.TV
return seasonPathExpressions.Any(r => r.IsMatch(path));
}
- public static bool IsSeriesFolder(string path, IEnumerable<KeyValuePair<string, WIN32_FIND_DATA>> fileSystemChildren)
+ public static bool IsSeriesFolder(string path, KeyValuePair<string, WIN32_FIND_DATA>[] fileSystemChildren)
{
- foreach (var child in fileSystemChildren)
+ for (int i = 0; i < fileSystemChildren.Length; i++)
{
+ var child = fileSystemChildren[i];
+
if (child.Value.IsDirectory)
{
if (IsSeasonFolder(child.Key))
@@ -76,22 +78,6 @@ namespace MediaBrowser.TV
return false;
}
- public static bool IsEpisode(string fullPath)
- {
- bool isInSeason = IsSeasonFolder(Path.GetDirectoryName(fullPath));
-
- if (isInSeason)
- {
- return true;
- }
- else if (EpisodeNumberFromFile(fullPath, isInSeason) != null)
- {
- return true;
- }
-
- return false;
- }
-
public static string EpisodeNumberFromFile(string fullPath, bool isInSeason)
{
string fl = fullPath.ToLower();