Do not import episodes with the same filename and size

This commit is contained in:
Mark McDowall 2013-07-15 16:53:06 -07:00
commit 8dacd076d8
7 changed files with 178 additions and 11 deletions

View file

@ -39,10 +39,9 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
return true;
}
var size = _diskProvider.GetFileSize(localEpisode.Path);
var runTime = _videoFileInfoReader.GetRunTime(localEpisode.Path);
if (size < Constants.IgnoreFileSize && runTime.TotalMinutes < 3)
if (localEpisode.Size < Constants.IgnoreFileSize && runTime.TotalMinutes < 3)
{
_logger.Trace("[{0}] appears to be a sample.", localEpisode.Path);
return false;