IChapterManager.cs 2.8 KB

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