Added some SeriesResolver fixes

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti 2012-08-29 20:21:08 -04:00
parent caa369c1a3
commit 2dc9732e19

View File

@ -100,16 +100,33 @@ namespace MediaBrowser.TV
public static bool IsSeriesFolder(string path, WIN32_FIND_DATA[] fileSystemChildren)
{
// A folder with more than 3 non-season folders in will not becounted as a series
int nonSeriesFolders = 0;
for (int i = 0; i < fileSystemChildren.Length; i++)
{
var child = fileSystemChildren[i];
if (child.IsHidden || child.IsSystemFile)
{
continue;
}
if (child.IsDirectory)
{
if (IsSeasonFolder(child.Path))
{
return true;
}
else
{
nonSeriesFolders++;
if (nonSeriesFolders >= 3)
{
return false;
}
}
}
else
{