1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

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

This commit is contained in:
Mark McDowall 2013-06-23 22:42:31 -07:00
parent 455196eefb
commit ef62af75df
2 changed files with 0 additions and 25 deletions

View File

@ -63,16 +63,6 @@ public void should_import_file()
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()
{

View File

@ -94,13 +94,6 @@ public void ProcessDownloadedEpisodesFolder()
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 @@ public void ProcessSubFolder(DirectoryInfo subfolderInfo)
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);