2
0

IAttachmentExtractor.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System.IO;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. using MediaBrowser.Controller.Entities;
  7. using MediaBrowser.Model.Dto;
  8. using MediaBrowser.Model.Entities;
  9. namespace MediaBrowser.Controller.MediaEncoding;
  10. public interface IAttachmentExtractor
  11. {
  12. /// <summary>
  13. /// Gets the path to the attachment file.
  14. /// </summary>
  15. /// <param name="item">The <see cref="BaseItem"/>.</param>
  16. /// <param name="mediaSourceId">The media source id.</param>
  17. /// <param name="attachmentStreamIndex">The attachment index.</param>
  18. /// <param name="cancellationToken">The cancellation token.</param>
  19. /// <returns>The async task.</returns>
  20. Task<(MediaAttachment Attachment, Stream Stream)> GetAttachment(
  21. BaseItem item,
  22. string mediaSourceId,
  23. int attachmentStreamIndex,
  24. CancellationToken cancellationToken);
  25. /// <summary>
  26. /// Gets the path to the attachment file.
  27. /// </summary>
  28. /// <param name="inputFile">The input file path.</param>
  29. /// <param name="mediaSource">The <see cref="MediaSourceInfo" /> source id.</param>
  30. /// <param name="cancellationToken">The cancellation token.</param>
  31. /// <returns>The async task.</returns>
  32. Task ExtractAllAttachments(
  33. string inputFile,
  34. MediaSourceInfo mediaSource,
  35. CancellationToken cancellationToken);
  36. }