using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Providers; namespace MediaBrowser.Controller.Subtitles { public interface ISubtitleManager { /// /// Occurs when [subtitle download failure]. /// event EventHandler SubtitleDownloadFailure; /// /// Adds the parts. /// /// The subtitle providers. void AddParts(IEnumerable subtitleProviders); /// /// Searches the subtitles. /// Task SearchSubtitles( Video video, string language, bool? isPerfectMatch, CancellationToken cancellationToken); /// /// Searches the subtitles. /// /// The request. /// The cancellation token. /// Task{RemoteSubtitleInfo[]}. Task SearchSubtitles( SubtitleSearchRequest request, CancellationToken cancellationToken); /// /// Downloads the subtitles. /// Task DownloadSubtitles(Video video, string subtitleId, CancellationToken cancellationToken); /// /// Downloads the subtitles. /// Task DownloadSubtitles(Video video, LibraryOptions libraryOptions, string subtitleId, CancellationToken cancellationToken); /// /// Gets the remote subtitles. /// /// The identifier. /// The cancellation token. /// . Task GetRemoteSubtitles(string id, CancellationToken cancellationToken); /// /// Deletes the subtitles. /// Task DeleteSubtitles(BaseItem item, int index); /// /// Gets the providers. /// SubtitleProviderInfo[] GetSupportedProviders(BaseItem item); } }