You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.7 KiB
72 lines
2.7 KiB
using MediaBrowser.Controller.Entities;
|
|
using MediaBrowser.Model.Providers;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MediaBrowser.Controller.Subtitles
|
|
{
|
|
public interface ISubtitleManager
|
|
{
|
|
/// <summary>
|
|
/// Adds the parts.
|
|
/// </summary>
|
|
/// <param name="subtitleProviders">The subtitle providers.</param>
|
|
void AddParts(IEnumerable<ISubtitleProvider> subtitleProviders);
|
|
|
|
/// <summary>
|
|
/// Searches the subtitles.
|
|
/// </summary>
|
|
/// <param name="video">The video.</param>
|
|
/// <param name="language">The language.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{IEnumerable{RemoteSubtitleInfo}}.</returns>
|
|
Task<IEnumerable<RemoteSubtitleInfo>> SearchSubtitles(Video video,
|
|
string language,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Searches the subtitles.
|
|
/// </summary>
|
|
/// <param name="request">The request.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{IEnumerable{RemoteSubtitleInfo}}.</returns>
|
|
Task<IEnumerable<RemoteSubtitleInfo>> SearchSubtitles(SubtitleSearchRequest request,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Downloads the subtitles.
|
|
/// </summary>
|
|
/// <param name="video">The video.</param>
|
|
/// <param name="subtitleId">The subtitle identifier.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task.</returns>
|
|
Task DownloadSubtitles(Video video,
|
|
string subtitleId,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Gets the remote subtitles.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task{SubtitleResponse}.</returns>
|
|
Task<SubtitleResponse> GetRemoteSubtitles(string id, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Deletes the subtitles.
|
|
/// </summary>
|
|
/// <param name="itemId">The item identifier.</param>
|
|
/// <param name="index">The index.</param>
|
|
/// <returns>Task.</returns>
|
|
Task DeleteSubtitles(string itemId, int index);
|
|
|
|
/// <summary>
|
|
/// Gets the providers.
|
|
/// </summary>
|
|
/// <param name="itemId">The item identifier.</param>
|
|
/// <returns>IEnumerable{SubtitleProviderInfo}.</returns>
|
|
IEnumerable<SubtitleProviderInfo> GetProviders(string itemId);
|
|
}
|
|
}
|