create notion of locked path

This commit is contained in:
Luke Pulverenti
2016-02-24 13:45:20 -05:00
parent 1b4dbe8894
commit 10d4ad98d9
3 changed files with 20 additions and 0 deletions

View File

@@ -64,6 +64,13 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
FileSize = new FileInfo(path).Length
};
if (_libraryMonitor.IsPathLocked(path))
{
result.Status = FileSortingStatus.Failure;
result.StatusMessage = "Path is locked by other processes. Please try again later.";
return result;
}
var namingOptions = ((LibraryManager)_libraryManager).GetNamingOptions();
var resolver = new Naming.TV.EpisodeResolver(namingOptions, new PatternsLogger());