using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Providers;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Configuration;
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.
///
Task SearchSubtitles(Video video,
string language,
bool? isPerfectMatch,
CancellationToken cancellationToken);
///
/// Searches the subtitles.
///
/// The request.
/// The cancellation token.
/// Task{IEnumerable{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{SubtitleResponse}.
Task GetRemoteSubtitles(string id, CancellationToken cancellationToken);
///
/// Deletes the subtitles.
///
Task DeleteSubtitles(BaseItem item, int index);
///
/// Gets the providers.
///
SubtitleProviderInfo[] GetSupportedProviders(BaseItem item);
}
}