jellyfin/MediaBrowser.Controller/Subtitles/ISubtitleProvider.cs

48 lines
1.7 KiB
C#
Raw Normal View History

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