Ignore specials when doing sample check

#ND-168 fixed
Fixed: Ignore sample check when importing specials (Season 0)
This commit is contained in:
Mark McDowall 2013-02-07 17:47:24 -08:00
commit b6ed048f94
2 changed files with 85 additions and 20 deletions

View file

@ -111,20 +111,23 @@ namespace NzbDrone.Core.Providers
return null;
}
long size = _diskProvider.GetSize(filePath);
var runTime = _mediaInfoProvider.GetRunTime(filePath);
if(size < Constants.IgnoreFileSize && runTime < 180)
{
Logger.Trace("[{0}] appears to be a sample. skipping.", filePath);
return null;
}
var parseResult = Parser.ParsePath(filePath);
if (parseResult == null)
return null;
var size = _diskProvider.GetSize(filePath);
var runTime = _mediaInfoProvider.GetRunTime(filePath);
if(series.IsDaily || parseResult.SeasonNumber > 0)
{
if (size < Constants.IgnoreFileSize && runTime < 180)
{
Logger.Trace("[{0}] appears to be a sample. skipping.", filePath);
return null;
}
}
if (!_diskProvider.IsChildOfPath(filePath, series.Path))
parseResult.SceneSource = true;