From 694db80d4c8e83ff381af56d2a3dde29e0855c3d Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Fri, 30 Jan 2026 21:58:24 +0100 Subject: Reroute on version removal --- MediaBrowser.Controller/Persistence/IItemRepository.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'MediaBrowser.Controller/Persistence') diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs index f7ed39730e..504adff86c 100644 --- a/MediaBrowser.Controller/Persistence/IItemRepository.cs +++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs @@ -210,4 +210,21 @@ public interface IItemRepository /// The user ID for access filtering. /// Dictionary mapping parent ID to child count. Dictionary GetChildCountBatch(IReadOnlyList parentIds, Guid? userId); + + /// + /// Gets parent IDs (Playlists/BoxSets) that reference the specified child with LinkedChildType.Manual. + /// + /// The child item ID. + /// List of parent IDs that reference the child. + IReadOnlyList GetManualLinkedParentIds(Guid childId); + + /// + /// Updates LinkedChildren references from one child to another, preserving SortOrder. + /// Handles duplicates: if parent already references toChildId, removes the old reference instead. + /// Used when video versions change to maintain collection integrity. + /// + /// The child ID to re-route from. + /// The child ID to re-route to. + /// Number of references updated. + int RerouteLinkedChildren(Guid fromChildId, Guid toChildId); } -- cgit v1.2.3