aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-03-07 20:12:42 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-03-07 20:12:42 +0100
commit077fa89717957f871b172ca4b2dc4a178efd3bc5 (patch)
tree1c2be0089b3c33cda1ed96bde4b76a715a845df7 /MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs
parent268f23f39ac18e783156b91b575ee6a105b6937c (diff)
Split BaseItemRepository and IItemRepository
Diffstat (limited to 'MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs')
-rw-r--r--MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs b/MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs
new file mode 100644
index 0000000000..d0cddf54a6
--- /dev/null
+++ b/MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using MediaBrowser.Controller.Entities.Audio;
+using LinkedChildType = MediaBrowser.Controller.Entities.LinkedChildType;
+
+namespace MediaBrowser.Controller.Persistence;
+
+/// <summary>
+/// Provides linked children query and manipulation operations.
+/// </summary>
+public interface ILinkedChildrenService
+{
+ /// <summary>
+ /// Gets the IDs of linked children for the specified parent.
+ /// </summary>
+ /// <param name="parentId">The parent item ID.</param>
+ /// <param name="childType">Optional child type filter.</param>
+ /// <returns>List of child item IDs.</returns>
+ IReadOnlyList<Guid> GetLinkedChildrenIds(Guid parentId, int? childType = null);
+
+ /// <summary>
+ /// Gets all artist matches from the database.
+ /// </summary>
+ /// <param name="artistNames">The names of the artists.</param>
+ /// <returns>A map of the artist name and the potential matches.</returns>
+ IReadOnlyDictionary<string, MusicArtist[]> FindArtists(IReadOnlyList<string> artistNames);
+
+ /// <summary>
+ /// Gets parent IDs 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.
+ /// </summary>
+ /// <param name="fromChildId">The child ID to re-route from.</param>
+ /// <param name="toChildId">The child ID to re-route to.</param>
+ /// <returns>List of parent item IDs whose LinkedChildren were modified.</returns>
+ IReadOnlyList<Guid> RerouteLinkedChildren(Guid fromChildId, Guid toChildId);
+
+ /// <summary>
+ /// Creates or updates a LinkedChild entry.
+ /// </summary>
+ /// <param name="parentId">The parent item ID.</param>
+ /// <param name="childId">The child item ID.</param>
+ /// <param name="childType">The type of linked child relationship.</param>
+ void UpsertLinkedChild(Guid parentId, Guid childId, LinkedChildType childType);
+}