mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-03 23:36:38 +01:00
Reroute on version removal
This commit is contained in:
@@ -714,5 +714,14 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="virtualFolderPath">The path to the virtualfolder.</param>
|
||||
/// <param name="pathInfo">The new virtualfolder.</param>
|
||||
public void CreateShortcut(string virtualFolderPath, MediaPathInfo pathInfo);
|
||||
|
||||
/// <summary>
|
||||
/// Re-routes LinkedChildren references from one child to another.
|
||||
/// Used when video versions change to maintain playlist/BoxSet integrity.
|
||||
/// </summary>
|
||||
/// <param name="fromChildId">The child ID to re-route from.</param>
|
||||
/// <param name="toChildId">The child ID to re-route to.</param>
|
||||
/// <returns>Number of references updated.</returns>
|
||||
int RerouteLinkedChildReferences(Guid fromChildId, Guid toChildId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,4 +210,21 @@ public interface IItemRepository
|
||||
/// <param name="userId">The user ID for access filtering.</param>
|
||||
/// <returns>Dictionary mapping parent ID to child count.</returns>
|
||||
Dictionary<Guid, int> GetChildCountBatch(IReadOnlyList<Guid> parentIds, Guid? userId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets parent IDs (Playlists/BoxSets) that reference the specified child with LinkedChildType.Manual.
|
||||
/// </summary>
|
||||
/// <param name="childId">The child item ID.</param>
|
||||
/// <returns>List of parent IDs that reference the child.</returns>
|
||||
IReadOnlyList<Guid> GetManualLinkedParentIds(Guid childId);
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="fromChildId">The child ID to re-route from.</param>
|
||||
/// <param name="toChildId">The child ID to re-route to.</param>
|
||||
/// <returns>Number of references updated.</returns>
|
||||
int RerouteLinkedChildren(Guid fromChildId, Guid toChildId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user