Don't skip files/folders that are too fresh on import

pull/6/head
Mark McDowall 12 years ago
parent 455196eefb
commit ef62af75df

@ -63,16 +63,6 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests
VerifyImport();
}
[Test]
public void should_skip_if_folder_is_too_fresh()
{
WithRecentFolderWrite();
Subject.ProcessDownloadedEpisodesFolder();
VerifyNoImport();
}
[Test]
public void should_search_for_series_using_folder_name()
{

@ -94,13 +94,6 @@ namespace NzbDrone.Core.MediaFiles
public void ProcessSubFolder(DirectoryInfo subfolderInfo)
{
var lastFolderWrite = _diskProvider.GetLastFolderWrite(subfolderInfo.FullName);
if (lastFolderWrite.AddMinutes(2) > DateTime.UtcNow)
{
_logger.Trace("[{0}] is too fresh. skipping. Last write {1} UTC", subfolderInfo.FullName, lastFolderWrite);
return;
}
var series = _parsingService.GetSeries(subfolderInfo.Name);
if (series == null)
@ -119,14 +112,6 @@ namespace NzbDrone.Core.MediaFiles
private void ProcessVideoFile(string videoFile, Series series)
{
var lastWrite = _diskProvider.GetLastFileWrite(videoFile);
if (lastWrite.AddMinutes(2) > DateTime.UtcNow)
{
_logger.Trace("[{0}] is too fresh. skipping. Last Write {1} UTC", videoFile, lastWrite);
return;
}
if (_diskProvider.IsFileLocked(new FileInfo(videoFile)))
{
_logger.Trace("[{0}] is currently locked by another process, skipping", videoFile);

Loading…
Cancel
Save