mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-18 19:25:00 -04:00
* 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
41 lines
1.4 KiB
C#
41 lines
1.4 KiB
C#
#nullable disable
|
|
|
|
#pragma warning disable CS1591
|
|
|
|
using System.IO;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MediaBrowser.Controller.Entities;
|
|
using MediaBrowser.Model.Dto;
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
namespace MediaBrowser.Controller.MediaEncoding;
|
|
|
|
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);
|
|
|
|
/// <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);
|
|
}
|