Added some SeriesResolver fixes
This commit is contained in:
parent
caa369c1a3
commit
2dc9732e19
|
@ -100,16 +100,33 @@ namespace MediaBrowser.TV
|
||||||
|
|
||||||
public static bool IsSeriesFolder(string path, WIN32_FIND_DATA[] fileSystemChildren)
|
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++)
|
for (int i = 0; i < fileSystemChildren.Length; i++)
|
||||||
{
|
{
|
||||||
var child = fileSystemChildren[i];
|
var child = fileSystemChildren[i];
|
||||||
|
|
||||||
|
if (child.IsHidden || child.IsSystemFile)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (child.IsDirectory)
|
if (child.IsDirectory)
|
||||||
{
|
{
|
||||||
if (IsSeasonFolder(child.Path))
|
if (IsSeasonFolder(child.Path))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nonSeriesFolders++;
|
||||||
|
|
||||||
|
if (nonSeriesFolders >= 3)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user