jellyfin/MediaBrowser.Controller/Subtitles/ISubtitleProvider.cs

48 lines
1.7 KiB
C#
Raw Normal View History

2014-05-11 22:38:10 +00:00
using MediaBrowser.Controller.Providers;
2015-06-11 21:22:44 +00:00
using MediaBrowser.Model.Dto;
2014-05-07 02:28:19 +00:00
using MediaBrowser.Model.Providers;
2014-05-05 14:45:45 +00:00
using System.Collections.Generic;
2014-05-05 04:36:45 +00:00
using System.Threading;
using System.Threading.Tasks;
2014-05-07 02:28:19 +00:00
namespace MediaBrowser.Controller.Subtitles
2014-05-05 04:36:45 +00:00
{
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>
2014-05-11 22:38:10 +00:00
IEnumerable<VideoContentType> SupportedMediaTypes { get; }
2014-05-05 04:36:45 +00:00
/// <summary>
2014-05-07 02:28:19 +00:00
/// Searches the subtitles.
2014-05-05 04:36:45 +00:00
/// </summary>
/// <param name="request">The request.</param>
/// <param name="cancellationToken">The cancellation token.</param>
2014-05-07 02:28:19 +00:00
/// <returns>Task{IEnumerable{RemoteSubtitleInfo}}.</returns>
2014-05-11 22:38:10 +00:00
Task<IEnumerable<RemoteSubtitleInfo>> Search(SubtitleSearchRequest request, CancellationToken cancellationToken);
2014-05-07 02:28:19 +00:00
/// <summary>
/// Gets the subtitles.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
2014-05-05 04:36:45 +00:00
/// <returns>Task{SubtitleResponse}.</returns>
2014-05-07 02:28:19 +00:00
Task<SubtitleResponse> GetSubtitles(string id, CancellationToken cancellationToken);
2015-06-11 21:22:44 +00:00
/// <summary>
/// Gets the supported languages.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;IEnumerable&lt;NameIdPair&gt;&gt;.</returns>
Task<IEnumerable<NameIdPair>> GetSupportedLanguages(CancellationToken cancellationToken);
2014-05-05 04:36:45 +00:00
}
}