aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-08-19 16:13:29 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-08-19 16:13:29 +0200
commitbd085665d687b55298fde7b9ef6d7124a5f94701 (patch)
tree5acc25bd0f15cb4498d29d28890f551711641d29 /Emby.Server.Implementations/Library/LibraryManager.cs
parent4e9713a03284a88d01d2d114e49d3a90d65aaebc (diff)
parentf586fc063f8a09ead4b370ac305ad2b7ed57259d (diff)
Merge remote-tracking branch 'upstream/master' into safeguard-invalid-provider-ids
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 0c7c411d0c..6a39b2177d 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -412,6 +412,13 @@ namespace Emby.Server.Implementations.Library
}
_persistenceService.DeleteItem([.. pathMaps.Select(f => f.Item.Id)]);
+
+ // Evict the deleted items from the cache and announce each removal.
+ foreach (var (item, _, _) in pathMaps)
+ {
+ _cache.TryRemove(item.Id, out _);
+ ReportItemRemoved(item, item.GetOwner() ?? item.GetParent());
+ }
}
public void DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, bool notifyParentItem)
@@ -611,6 +618,12 @@ namespace Emby.Server.Implementations.Library
folder.UserData = null;
}
+ // Announce the descendants before the item itself.
+ foreach (var child in children)
+ {
+ ReportItemRemoved(child, item);
+ }
+
ReportItemRemoved(item, parent);
}