IChapterProvider.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using MediaBrowser.Controller.Providers;
  2. using MediaBrowser.Model.Chapters;
  3. using System.Collections.Generic;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. namespace MediaBrowser.Controller.Chapters
  7. {
  8. public interface IChapterProvider
  9. {
  10. /// <summary>
  11. /// Gets the name.
  12. /// </summary>
  13. /// <value>The name.</value>
  14. string Name { get; }
  15. /// <summary>
  16. /// Gets the supported media types.
  17. /// </summary>
  18. /// <value>The supported media types.</value>
  19. IEnumerable<VideoContentType> SupportedMediaTypes { get; }
  20. /// <summary>
  21. /// Searches the specified request.
  22. /// </summary>
  23. /// <param name="request">The request.</param>
  24. /// <param name="cancellationToken">The cancellation token.</param>
  25. /// <returns>Task{IEnumerable{RemoteChapterResult}}.</returns>
  26. Task<IEnumerable<RemoteChapterResult>> Search(ChapterSearchRequest request, CancellationToken cancellationToken);
  27. /// <summary>
  28. /// Gets the chapters.
  29. /// </summary>
  30. /// <param name="id">The identifier.</param>
  31. /// <param name="cancellationToken">The cancellation token.</param>
  32. /// <returns>Task{ChapterResponse}.</returns>
  33. Task<ChapterResponse> GetChapters(string id, CancellationToken cancellationToken);
  34. }
  35. }