update library monitor

This commit is contained in:
Luke Pulverenti
2016-09-20 15:43:27 -04:00
parent 97ea2ff43a
commit 61ee765de9
2 changed files with 17 additions and 2 deletions

View File

@@ -404,7 +404,20 @@ namespace MediaBrowser.Server.Implementations.IO
{
Logger.Debug("Changed detected of type " + e.ChangeType + " to " + e.FullPath);
ReportFileSystemChanged(e.FullPath);
var path = e.FullPath;
// For deletes, use the parent path
if (e.ChangeType == WatcherChangeTypes.Deleted)
{
var parentPath = Path.GetDirectoryName(path);
if (!string.IsNullOrWhiteSpace(parentPath))
{
path = parentPath;
}
}
ReportFileSystemChanged(path);
}
catch (Exception ex)
{