diff options
Diffstat (limited to 'MediaBrowser.Controller/Persistence')
| -rw-r--r-- | MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Persistence/IPeopleRepository.cs | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs b/MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs index a4614fc125..79c29410e4 100644 --- a/MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs +++ b/MediaBrowser.Controller/Persistence/ILinkedChildrenService.cs @@ -20,6 +20,15 @@ public interface ILinkedChildrenService IReadOnlyList<Guid> GetLinkedChildrenIds(Guid parentId, int? childType = null); /// <summary> + /// Gets, in a single query, the subset of the supplied items that own at least one alternate + /// version (local or linked). Items absent from the result have no alternate versions, so their + /// media source count is one. + /// </summary> + /// <param name="itemIds">The item IDs to check.</param> + /// <returns>The set of item IDs that have alternate versions.</returns> + IReadOnlySet<Guid> GetItemIdsWithAlternateVersions(IReadOnlyList<Guid> itemIds); + + /// <summary> /// Gets all artist matches from the database. /// </summary> /// <param name="artistNames">The names of the artists.</param> diff --git a/MediaBrowser.Controller/Persistence/IPeopleRepository.cs b/MediaBrowser.Controller/Persistence/IPeopleRepository.cs index 9811241d31..15183a8806 100644 --- a/MediaBrowser.Controller/Persistence/IPeopleRepository.cs +++ b/MediaBrowser.Controller/Persistence/IPeopleRepository.cs @@ -34,6 +34,12 @@ public interface IPeopleRepository IReadOnlyList<string> GetPeopleNames(InternalPeopleQuery filter); /// <summary> + /// Deletes every credit that no item maps to any more. + /// </summary> + /// <returns>The number of credits that were deleted.</returns> + int DeleteOrphanedCredits(); + + /// <summary> /// Gets the distinct people names per item for multiple items efficiently by querying from the mapping table. /// </summary> /// <param name="itemIds">The item IDs to get people for.</param> |
