IChapterRepository.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using MediaBrowser.Model.Dto;
  4. using MediaBrowser.Model.Entities;
  5. namespace MediaBrowser.Controller.Chapters;
  6. /// <summary>
  7. /// Interface IChapterManager.
  8. /// </summary>
  9. public interface IChapterRepository
  10. {
  11. /// <summary>
  12. /// Saves the chapters.
  13. /// </summary>
  14. /// <param name="itemId">The item.</param>
  15. /// <param name="chapters">The set of chapters.</param>
  16. void SaveChapters(Guid itemId, IReadOnlyList<ChapterInfo> chapters);
  17. /// <summary>
  18. /// Gets all chapters associated with the baseItem.
  19. /// </summary>
  20. /// <param name="baseItem">The baseitem.</param>
  21. /// <returns>A readonly list of chapter instances.</returns>
  22. IReadOnlyList<ChapterInfo> GetChapters(BaseItemDto baseItem);
  23. /// <summary>
  24. /// Gets a single chapter of a BaseItem on a specific index.
  25. /// </summary>
  26. /// <param name="baseItem">The baseitem.</param>
  27. /// <param name="index">The index of that chapter.</param>
  28. /// <returns>A chapter instance.</returns>
  29. ChapterInfo? GetChapter(BaseItemDto baseItem, int index);
  30. /// <summary>
  31. /// Gets all chapters associated with the baseItem.
  32. /// </summary>
  33. /// <param name="baseItemId">The BaseItems id.</param>
  34. /// <returns>A readonly list of chapter instances.</returns>
  35. IReadOnlyList<ChapterInfo> GetChapters(Guid baseItemId);
  36. /// <summary>
  37. /// Gets a single chapter of a BaseItem on a specific index.
  38. /// </summary>
  39. /// <param name="baseItemId">The BaseItems id.</param>
  40. /// <param name="index">The index of that chapter.</param>
  41. /// <returns>A chapter instance.</returns>
  42. ChapterInfo? GetChapter(Guid baseItemId, int index);
  43. }