1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-27 01:57:21 +00:00

last modified time is logged if folder is too fresh

This commit is contained in:
kay.one 2013-05-19 21:52:06 -07:00
parent cbb80714c9
commit 91c0e21a4d

View file

@ -84,9 +84,10 @@ public void ProcessDownloadedEpiosdesFolder()
public void ProcessSubFolder(DirectoryInfo subfolderInfo) public void ProcessSubFolder(DirectoryInfo subfolderInfo)
{ {
if (_diskProvider.GetLastFolderWrite(subfolderInfo.FullName).AddMinutes(2) > DateTime.UtcNow) var lastFolderWrite = _diskProvider.GetLastFolderWrite(subfolderInfo.FullName);
if (lastFolderWrite.AddMinutes(2) > DateTime.UtcNow)
{ {
_logger.Trace("[{0}] is too fresh. skipping", subfolderInfo.FullName); _logger.Trace("[{0}] is too fresh. skipping. Last write {1} UTC", subfolderInfo.FullName, lastFolderWrite);
return; return;
} }
@ -108,9 +109,11 @@ public void ProcessSubFolder(DirectoryInfo subfolderInfo)
public void ProcessVideoFile(string videoFile, Series series) public void ProcessVideoFile(string videoFile, Series series)
{ {
if (_diskProvider.GetLastFileWrite(videoFile).AddMinutes(2) > DateTime.UtcNow) var lastWrite = _diskProvider.GetLastFileWrite(videoFile);
if (lastWrite.AddMinutes(2) > DateTime.UtcNow)
{ {
_logger.Trace("[{0}] is too fresh. skipping", videoFile); _logger.Trace("[{0}] is too fresh. skipping. Last Write {1} UTC", videoFile, lastWrite);
return; return;
} }