diff options
| author | Tim Eisele <Ghost_of_Stone@web.de> | 2025-04-03 17:17:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-03 09:17:14 -0600 |
| commit | 596b63551196f7ce9bcb8d8de617d3c79201a375 (patch) | |
| tree | fcae5828920664cc4c54955312328b4cbd7cd28d /MediaBrowser.Controller/MediaEncoding/IAttachmentExtractor.cs | |
| parent | 0bde7bae05de1933a9714870c8e4e6f1a946cd93 (diff) | |
Cleanup extracted files (#13760)
* Cleanup extracted files
* Pagination and fixes
* Add migration for attachments to MigrateLibraryDb
* Unify attachment handling
* Don't extract again if files were already extracted
* Fix MKS attachment extraction
* Always run full extraction on mks
* Don't try to extract mjpeg streams as attachments
* Fallback to check if attachments were extracted to cache folder
* Fixup
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/IAttachmentExtractor.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/IAttachmentExtractor.cs | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/IAttachmentExtractor.cs b/MediaBrowser.Controller/MediaEncoding/IAttachmentExtractor.cs index 09840d2ee..d8d136472 100644 --- a/MediaBrowser.Controller/MediaEncoding/IAttachmentExtractor.cs +++ b/MediaBrowser.Controller/MediaEncoding/IAttachmentExtractor.cs @@ -9,26 +9,33 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; -namespace MediaBrowser.Controller.MediaEncoding -{ - public interface IAttachmentExtractor - { - Task<(MediaAttachment Attachment, Stream Stream)> GetAttachment( - BaseItem item, - string mediaSourceId, - int attachmentStreamIndex, - CancellationToken cancellationToken); +namespace MediaBrowser.Controller.MediaEncoding; - Task ExtractAllAttachments( - string inputFile, - MediaSourceInfo mediaSource, - string outputPath, - CancellationToken cancellationToken); +public interface IAttachmentExtractor +{ + /// <summary> + /// Gets the path to the attachment file. + /// </summary> + /// <param name="item">The <see cref="BaseItem"/>.</param> + /// <param name="mediaSourceId">The media source id.</param> + /// <param name="attachmentStreamIndex">The attachment index.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>The async task.</returns> + Task<(MediaAttachment Attachment, Stream Stream)> GetAttachment( + BaseItem item, + string mediaSourceId, + int attachmentStreamIndex, + CancellationToken cancellationToken); - Task ExtractAllAttachmentsExternal( - string inputArgument, - string id, - string outputPath, - CancellationToken cancellationToken); - } + /// <summary> + /// Gets the path to the attachment file. + /// </summary> + /// <param name="inputFile">The input file path.</param> + /// <param name="mediaSource">The <see cref="MediaSourceInfo" /> source id.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>The async task.</returns> + Task ExtractAllAttachments( + string inputFile, + MediaSourceInfo mediaSource, + CancellationToken cancellationToken); } |
