jellyfin-server/MediaBrowser.Controller/Subtitles/ISubtitleProvider.cs

44 lines
1.4 KiB
C#
Raw Normal View History

#nullable disable
#pragma warning disable CS1591
using System.Collections.Generic;
2018-12-27 23:27:57 +00:00
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Providers;
2018-12-27 23:27:57 +00:00
namespace MediaBrowser.Controller.Subtitles
{
public interface ISubtitleProvider
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
string Name { get; }
/// <summary>
/// Gets the supported media types.
/// </summary>
/// <value>The supported media types.</value>
IEnumerable<VideoContentType> SupportedMediaTypes { get; }
/// <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>> Search(SubtitleSearchRequest request, CancellationToken cancellationToken);
/// <summary>
/// Gets the subtitles.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{SubtitleResponse}.</returns>
Task<SubtitleResponse> GetSubtitles(string id, CancellationToken cancellationToken);
}
}