#nullable disable #pragma warning disable CS1591 using System; using System.Collections.Generic; using System.IO; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Jellyfin.Data.Events; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Providers; namespace MediaBrowser.Controller.Providers { /// /// Interface IProviderManager. /// public interface IProviderManager { event EventHandler> RefreshStarted; event EventHandler> RefreshCompleted; event EventHandler>> RefreshProgress; /// /// Queues the refresh. /// /// Item ID. /// MetadataRefreshOptions for operation. /// RefreshPriority for operation. void QueueRefresh(Guid itemId, MetadataRefreshOptions options, RefreshPriority priority); /// /// Refreshes the full item. /// /// The item. /// The options. /// The cancellation token. /// Task. Task RefreshFullItem(BaseItem item, MetadataRefreshOptions options, CancellationToken cancellationToken); /// /// Refreshes the metadata. /// /// The item. /// The options. /// The cancellation token. /// Task. Task RefreshSingleItem(BaseItem item, MetadataRefreshOptions options, CancellationToken cancellationToken); /// /// Runs multiple metadata refreshes concurrently. /// /// The action to run. /// The cancellation token. /// A representing the result of the asynchronous operation. Task RunMetadataRefresh(Func action, CancellationToken cancellationToken); /// /// Saves the image. /// /// The item. /// The URL. /// The type. /// Index of the image. /// The cancellation token. /// Task. Task SaveImage(BaseItem item, string url, ImageType type, int? imageIndex, CancellationToken cancellationToken); /// /// Saves the image. /// /// The item. /// The source. /// Type of the MIME. /// The type. /// Index of the image. /// The cancellation token. /// Task. Task SaveImage(BaseItem item, Stream source, string mimeType, ImageType type, int? imageIndex, CancellationToken cancellationToken); /// /// Saves the image. /// /// Image to save. /// Source of image. /// Mime type image. /// Type of image. /// Index of image. /// Option to save locally. /// CancellationToken to use with operation. /// Task. Task SaveImage(BaseItem item, string source, string mimeType, ImageType type, int? imageIndex, bool? saveLocallyWithMedia, CancellationToken cancellationToken); Task SaveImage(Stream source, string mimeType, string path); /// /// Adds the metadata providers. /// /// Image providers to use. /// Metadata services to use. /// Metadata providers to use. /// Metadata savers to use. /// External IDs to use. void AddParts( IEnumerable imageProviders, IEnumerable metadataServices, IEnumerable metadataProviders, IEnumerable metadataSavers, IEnumerable externalIds); /// /// Gets the available remote images. /// /// The item. /// The query. /// The cancellation token. /// Task{IEnumerable{RemoteImageInfo}}. Task> GetAvailableRemoteImages(BaseItem item, RemoteImageQuery query, CancellationToken cancellationToken); /// /// Gets the image providers. /// /// The item. /// IEnumerable{ImageProviderInfo}. IEnumerable GetRemoteImageProviderInfo(BaseItem item); /// /// Gets the image providers for the provided item. /// /// The item. /// The image refresh options. /// The image providers for the item. IEnumerable GetImageProviders(BaseItem item, ImageRefreshOptions refreshOptions); /// /// Gets the metadata providers for the provided item. /// /// The item. /// The library options. /// The type of metadata provider. /// The metadata providers. IEnumerable> GetMetadataProviders(BaseItem item, LibraryOptions libraryOptions) where T : BaseItem; /// /// Gets all metadata plugins. /// /// IEnumerable{MetadataPlugin}. MetadataPluginSummary[] GetAllMetadataPlugins(); /// /// Gets the external urls. /// /// The item. /// IEnumerable{ExternalUrl}. IEnumerable GetExternalUrls(BaseItem item); /// /// Gets the external identifier infos. /// /// The item. /// IEnumerable{ExternalIdInfo}. IEnumerable GetExternalIdInfos(IHasProviderIds item); /// /// Saves the metadata. /// /// The item. /// Type of the update. /// The task object representing the asynchronous operation. Task SaveMetadataAsync(BaseItem item, ItemUpdateType updateType); /// /// Saves the metadata. /// /// The item. /// Type of the update. /// The metadata savers. /// The task object representing the asynchronous operation. Task SaveMetadataAsync(BaseItem item, ItemUpdateType updateType, IEnumerable savers); /// /// Gets the metadata options. /// /// The item. /// MetadataOptions. MetadataOptions GetMetadataOptions(BaseItem item); /// /// Gets the remote search results. /// /// The type of the t item type. /// The type of the t lookup type. /// The search information. /// The cancellation token. /// Task{IEnumerable{SearchResult{``1}}}. Task> GetRemoteSearchResults( RemoteSearchQuery searchInfo, CancellationToken cancellationToken) where TItemType : BaseItem, new() where TLookupType : ItemLookupInfo; /// /// Gets the search image. /// /// Name of the provider. /// The URL. /// The cancellation token. /// Task{HttpResponseInfo}. Task GetSearchImage(string providerName, string url, CancellationToken cancellationToken); HashSet GetRefreshQueue(); void OnRefreshStart(BaseItem item); void OnRefreshProgress(BaseItem item, double progress); void OnRefreshComplete(BaseItem item); double? GetRefreshProgress(Guid id); } }