using System; using Jellyfin.Data.Enums; namespace MediaBrowser.Controller.Library; /// /// Query object for search providers. /// public class SearchProviderQuery { /// /// Gets the search term. /// public required string SearchTerm { get; init; } /// /// Gets the user ID for user-specific searches. /// public Guid? UserId { get; init; } /// /// Gets the item types to include in the search. An empty array means every type is eligible. /// When this is non-empty it is the authoritative type filter and /// does not apply; excludes only take effect when no include types were requested. /// public BaseItemKind[] IncludeItemTypes { get; init; } = []; /// /// Gets the item types to exclude from the search. /// public BaseItemKind[] ExcludeItemTypes { get; init; } = []; /// /// Gets the media types to include in the search. This is an additional constraint rather than /// an alternative one: a provider must return only items that match both the requested media /// types and the requested item types, not the union of the two. /// public MediaType[] MediaTypes { get; init; } = []; /// /// Gets the maximum number of results to return. /// public int? Limit { get; init; } /// /// Gets the parent ID to scope the search. This scopes to the whole subtree, not just direct /// children - callers routinely pass a library folder id and expect items nested arbitrarily /// deep beneath it (an episode under a season under a series) to match. /// public Guid? ParentId { get; init; } }