IChapterManager.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using MediaBrowser.Controller.Entities;
  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. /// <summary>
  9. /// Interface IChapterManager
  10. /// </summary>
  11. public interface IChapterManager
  12. {
  13. /// <summary>
  14. /// Adds the parts.
  15. /// </summary>
  16. /// <param name="chapterProviders">The chapter providers.</param>
  17. void AddParts(IEnumerable<IChapterProvider> chapterProviders);
  18. /// <summary>
  19. /// Searches the specified video.
  20. /// </summary>
  21. /// <param name="video">The video.</param>
  22. /// <param name="cancellationToken">The cancellation token.</param>
  23. /// <returns>Task{IEnumerable{RemoteChapterResult}}.</returns>
  24. Task<IEnumerable<RemoteChapterResult>> Search(Video video, CancellationToken cancellationToken);
  25. /// <summary>
  26. /// Searches the specified request.
  27. /// </summary>
  28. /// <param name="request">The request.</param>
  29. /// <param name="cancellationToken">The cancellation token.</param>
  30. /// <returns>Task{IEnumerable{RemoteChapterResult}}.</returns>
  31. Task<IEnumerable<RemoteChapterResult>> Search(ChapterSearchRequest request, CancellationToken cancellationToken);
  32. /// <summary>
  33. /// Gets the chapters.
  34. /// </summary>
  35. /// <param name="id">The identifier.</param>
  36. /// <param name="cancellationToken">The cancellation token.</param>
  37. /// <returns>Task{ChapterResponse}.</returns>
  38. Task<ChapterResponse> GetChapters(string id, CancellationToken cancellationToken);
  39. /// <summary>
  40. /// Gets the providers.
  41. /// </summary>
  42. /// <param name="itemId">The item identifier.</param>
  43. /// <returns>IEnumerable{ChapterProviderInfo}.</returns>
  44. IEnumerable<ChapterProviderInfo> GetProviders(string itemId);
  45. /// <summary>
  46. /// Gets the providers.
  47. /// </summary>
  48. /// <returns>IEnumerable{ChapterProviderInfo}.</returns>
  49. IEnumerable<ChapterProviderInfo> GetProviders();
  50. }
  51. }