mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-07 16:28:56 +01:00
update library monitor
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user