IChapterManager.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. using MediaBrowser.Model.Configuration;
  7. using MediaBrowser.Model.Entities;
  8. namespace MediaBrowser.Controller.Chapters
  9. {
  10. /// <summary>
  11. /// Interface IChapterManager
  12. /// </summary>
  13. public interface IChapterManager
  14. {
  15. /// <summary>
  16. /// Adds the parts.
  17. /// </summary>
  18. /// <param name="chapterProviders">The chapter providers.</param>
  19. void AddParts(IEnumerable<IChapterProvider> chapterProviders);
  20. /// <summary>
  21. /// Gets the chapters.
  22. /// </summary>
  23. /// <param name="itemId">The item identifier.</param>
  24. /// <returns>List{ChapterInfo}.</returns>
  25. IEnumerable<ChapterInfo> GetChapters(string itemId);
  26. /// <summary>
  27. /// Saves the chapters.
  28. /// </summary>
  29. /// <param name="itemId">The item identifier.</param>
  30. /// <param name="chapters">The chapters.</param>
  31. /// <param name="cancellationToken">The cancellation token.</param>
  32. /// <returns>Task.</returns>
  33. Task SaveChapters(string itemId, List<ChapterInfo> chapters, CancellationToken cancellationToken);
  34. /// <summary>
  35. /// Searches the specified video.
  36. /// </summary>
  37. /// <param name="video">The video.</param>
  38. /// <param name="cancellationToken">The cancellation token.</param>
  39. /// <returns>Task{IEnumerable{RemoteChapterResult}}.</returns>
  40. Task<IEnumerable<RemoteChapterResult>> Search(Video video, CancellationToken cancellationToken);
  41. /// <summary>
  42. /// Searches the specified request.
  43. /// </summary>
  44. /// <param name="request">The request.</param>
  45. /// <param name="cancellationToken">The cancellation token.</param>
  46. /// <returns>Task{IEnumerable{RemoteChapterResult}}.</returns>
  47. Task<IEnumerable<RemoteChapterResult>> Search(ChapterSearchRequest request, CancellationToken cancellationToken);
  48. /// <summary>
  49. /// Gets the chapters.
  50. /// </summary>
  51. /// <param name="id">The identifier.</param>
  52. /// <param name="cancellationToken">The cancellation token.</param>
  53. /// <returns>Task{ChapterResponse}.</returns>
  54. Task<ChapterResponse> GetChapters(string id, CancellationToken cancellationToken);
  55. /// <summary>
  56. /// Gets the providers.
  57. /// </summary>
  58. /// <param name="itemId">The item identifier.</param>
  59. /// <returns>IEnumerable{ChapterProviderInfo}.</returns>
  60. IEnumerable<ChapterProviderInfo> GetProviders(string itemId);
  61. /// <summary>
  62. /// Gets the providers.
  63. /// </summary>
  64. /// <returns>IEnumerable{ChapterProviderInfo}.</returns>
  65. IEnumerable<ChapterProviderInfo> GetProviders();
  66. /// <summary>
  67. /// Gets the configuration.
  68. /// </summary>
  69. /// <returns>ChapterOptions.</returns>
  70. ChapterOptions GetConfiguration();
  71. }
  72. }