From 07a802d8fa93460c9f2a7f42da7a1f14a893a322 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Sun, 3 May 2026 23:33:56 +0200 Subject: Implement search providers --- MediaBrowser.Controller/Library/ISearchProvider.cs | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 MediaBrowser.Controller/Library/ISearchProvider.cs (limited to 'MediaBrowser.Controller/Library/ISearchProvider.cs') diff --git a/MediaBrowser.Controller/Library/ISearchProvider.cs b/MediaBrowser.Controller/Library/ISearchProvider.cs new file mode 100644 index 0000000000..3b300ed38b --- /dev/null +++ b/MediaBrowser.Controller/Library/ISearchProvider.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using MediaBrowser.Model.Configuration; + +namespace MediaBrowser.Controller.Library; + +/// +/// Interface for search providers. +/// +public interface ISearchProvider +{ + /// + /// Gets the name of the provider. + /// + string Name { get; } + + /// + /// Gets the type of the provider. + /// + MetadataPluginType Type { get; } + + /// + /// Gets the priority of the provider. Lower values execute first. + /// + int Priority { get; } + + /// + /// Searches for items matching the query. + /// + /// The search query. + /// Cancellation token. + /// Ranked list of candidate item IDs with scores. + Task> SearchAsync( + SearchProviderQuery query, + CancellationToken cancellationToken); + + /// + /// Determines whether this provider can handle the given query. + /// + /// The search query to evaluate. + /// True if this provider can search for the query; otherwise, false. + bool CanSearch(SearchProviderQuery query); +} -- cgit v1.2.3