using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Jellyfin.Database.Implementations.Entities; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dto; namespace MediaBrowser.Controller.Library; /// /// Interface for managing similar items providers and operations. /// public interface ISimilarItemsManager { /// /// Registers similar items providers discovered through dependency injection. /// /// The similar items providers to register. void AddParts(IEnumerable providers); /// /// Gets the similar items providers for a specific item type. /// /// The item type. /// The list of similar items providers for that type. IReadOnlyList GetSimilarItemsProviders() where T : BaseItem; /// /// Gets similar items for the specified item. /// /// The source item to find similar items for. /// Artist IDs to exclude from results. /// The user context. /// The DTO options. /// Maximum number of results. /// The library options for provider configuration. /// The cancellation token. /// The list of similar items. Task> GetSimilarItemsAsync( BaseItem item, IReadOnlyList excludeArtistIds, User? user, DtoOptions dtoOptions, int? limit, LibraryOptions? libraryOptions, CancellationToken cancellationToken); /// /// Builds movie recommendations for a user: a mix of similar-items and person-based categories, /// scheduled round-robin and capped to . /// /// The user the recommendations are for. May be for anonymous access. /// The library/folder to localize the search to. Pass to use the root. /// Maximum number of recommendation categories to return. /// Maximum number of items per category. /// DTO options used when querying the library. /// The cancellation token. /// The list of recommendation categories, ordered by . Task> GetMovieRecommendationsAsync( User? user, Guid parentId, int categoryLimit, int itemLimit, DtoOptions dtoOptions, CancellationToken cancellationToken); }