aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/IBatchLocalSimilarItemsProvider.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2026-05-27 20:59:18 +0200
committerGitHub <noreply@github.com>2026-05-27 20:59:18 +0200
commit2f17516d4bd8700e4a66f609b9c5fac835020407 (patch)
treeb26176e8adf7f6d56cd5a002fdc37b63800cf71a /MediaBrowser.Controller/Library/IBatchLocalSimilarItemsProvider.cs
parentcbd0c5b8417e42f072007194d204ff711b11ff1a (diff)
parent5ed3ffdb42cde2ddb45d0ca55d84d885d877d2a9 (diff)
Merge pull request #16856 from Shadowghost/movie-recommendationsHEADmaster
Fix movie recommendations
Diffstat (limited to 'MediaBrowser.Controller/Library/IBatchLocalSimilarItemsProvider.cs')
-rw-r--r--MediaBrowser.Controller/Library/IBatchLocalSimilarItemsProvider.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Library/IBatchLocalSimilarItemsProvider.cs b/MediaBrowser.Controller/Library/IBatchLocalSimilarItemsProvider.cs
new file mode 100644
index 0000000000..af49711606
--- /dev/null
+++ b/MediaBrowser.Controller/Library/IBatchLocalSimilarItemsProvider.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using MediaBrowser.Controller.Entities;
+
+namespace MediaBrowser.Controller.Library;
+
+/// <summary>
+/// A local similar items provider that supports batch queries across multiple source items.
+/// Implementations share access filtering and entity loading across all sources for better performance.
+/// </summary>
+public interface IBatchLocalSimilarItemsProvider : ISimilarItemsProvider
+{
+ /// <summary>
+ /// Gets similar items for multiple source items in a single batch.
+ /// </summary>
+ /// <param name="sourceItems">The source items to find similar items for.</param>
+ /// <param name="query">The query options.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Per-source-item results keyed by source item ID.</returns>
+ Task<Dictionary<Guid, IReadOnlyList<BaseItem>>> GetBatchSimilarItemsAsync(
+ IReadOnlyList<BaseItem> sourceItems,
+ SimilarItemsQuery query,
+ CancellationToken cancellationToken);
+}