aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/IRemoteSimilarItemsProvider.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-05-03 23:43:01 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-05-03 23:43:01 +0200
commit4ebce3907062ade1937440628eebd665440b338d (patch)
tree23b94df3c1fc76de39345f1480d0198b6d7f0ac1 /MediaBrowser.Controller/Library/IRemoteSimilarItemsProvider.cs
parent622947e37425f3620432995cde5d4a0809d91694 (diff)
Implement Similarity providers
Diffstat (limited to 'MediaBrowser.Controller/Library/IRemoteSimilarItemsProvider.cs')
-rw-r--r--MediaBrowser.Controller/Library/IRemoteSimilarItemsProvider.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Library/IRemoteSimilarItemsProvider.cs b/MediaBrowser.Controller/Library/IRemoteSimilarItemsProvider.cs
new file mode 100644
index 0000000000..a77b6628d9
--- /dev/null
+++ b/MediaBrowser.Controller/Library/IRemoteSimilarItemsProvider.cs
@@ -0,0 +1,26 @@
+using System.Collections.Generic;
+using System.Threading;
+using MediaBrowser.Controller.Entities;
+
+namespace MediaBrowser.Controller.Library;
+
+/// <summary>
+/// Provides similar item references from remote/external sources for a specific item type.
+/// Returns lightweight references with ProviderIds that the manager resolves to library items.
+/// </summary>
+/// <typeparam name="TItemType">The type of item this provider handles.</typeparam>
+public interface IRemoteSimilarItemsProvider<TItemType> : ISimilarItemsProvider
+ where TItemType : BaseItem
+{
+ /// <summary>
+ /// Gets similar item references from an external source as an async stream.
+ /// </summary>
+ /// <param name="item">The source item to find similar items for.</param>
+ /// <param name="query">The query options (user, limit, exclusions).</param>
+ /// <param name="cancellationToken">Cancellation token.</param>
+ /// <returns>An async enumerable of similar item references.</returns>
+ IAsyncEnumerable<SimilarItemReference> GetSimilarItemsAsync(
+ TItemType item,
+ SimilarItemsQuery query,
+ CancellationToken cancellationToken);
+}