From bb6c3b4eecee46a0a6222ffe17657cabc7da97f4 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Sat, 7 Feb 2026 21:17:01 +0100 Subject: Fix BoxSet collapse handling and deletion --- MediaBrowser.Controller/Entities/CollectionFolder.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Entities/CollectionFolder.cs') diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index cf615788ee..ffdc8421da 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -79,14 +79,27 @@ namespace MediaBrowser.Controller.Entities public CollectionType? CollectionType { get; set; } /// - /// Gets the item's children. + /// Gets or sets the item's children. /// /// /// Our children are actually just references to the ones in the physical root... + /// Setting to null propagates invalidation to physical folders since the getter + /// always delegates to and never reads the backing field. /// /// The actual children. [JsonIgnore] - public override IEnumerable Children => GetActualChildren(); + public override IEnumerable Children + { + get => GetActualChildren(); + set + { + // The getter delegates to physical folders, so invalidate their caches. + foreach (var folder in GetPhysicalFolders(true)) + { + folder.Children = null; + } + } + } [JsonIgnore] public override bool SupportsPeople => false; -- cgit v1.2.3