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