Disk scan is much much much much faster.

This commit is contained in:
kay.one 2013-07-18 22:05:07 -07:00
parent c21ff235b6
commit b676f868ce
10 changed files with 112 additions and 81 deletions

View file

@ -41,11 +41,16 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
return true;
}
if (localEpisode.Size > SampleSizeLimit)
{
return true;
}
var runTime = _videoFileInfoReader.GetRunTime(localEpisode.Path);
if (localEpisode.Size < SampleSizeLimit && runTime.TotalMinutes < 3)
if (runTime.TotalMinutes < 3)
{
_logger.Trace("[{0}] appears to be a sample.", localEpisode.Path);
_logger.Trace("[{0}] appears to be a sample. Size: {1} Runtime: {2}", localEpisode.Path, localEpisode.Size, runTime);
return false;
}