mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-05 21:33:02 +02:00
Merge branch 'media-attachments' of github.com:Unhelpful/jellyfin into media-attachments
This commit is contained in:
commit
380d023351
|
@ -143,6 +143,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public List<MediaAttachment> GetMediaAttachments(Guid itemId)
|
public List<MediaAttachment> GetMediaAttachments(Guid itemId)
|
||||||
{
|
{
|
||||||
return GetMediaAttachments(new MediaAttachmentQuery
|
return GetMediaAttachments(new MediaAttachmentQuery
|
||||||
|
|
|
@ -44,11 +44,13 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// <param name="">The item identifier.</param>
|
/// <param name="">The item identifier.</param>
|
||||||
/// <returns>IEnumerable<MediaAttachment>.</returns>
|
/// <returns>IEnumerable<MediaAttachment>.</returns>
|
||||||
List<MediaAttachment> GetMediaAttachments(Guid itemId);
|
List<MediaAttachment> GetMediaAttachments(Guid itemId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the media attachments.
|
/// Gets the media attachments.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="">The The media source identifier.</param>
|
/// <param name="">The The media source identifier.</param>
|
||||||
/// <returns>IEnumerable<MediaAttachment>.</returns>
|
/// <returns>IEnumerable<MediaAttachment>.</returns>
|
||||||
|
|
||||||
List<MediaAttachment> GetMediaAttachments(string mediaSourceId);
|
List<MediaAttachment> GetMediaAttachments(string mediaSourceId);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the media attachments.
|
/// Gets the media attachments.
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace MediaBrowser.MediaEncoding.Attachments
|
||||||
MediaAttachment mediaAttachment,
|
MediaAttachment mediaAttachment,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var inputFiles = new[] {mediaSource.Path};
|
var inputFiles = new[] { mediaSource.Path };
|
||||||
var attachmentPath = await GetReadableFile(mediaSource.Path, inputFiles, mediaSource.Protocol, mediaAttachment, cancellationToken).ConfigureAwait(false);
|
var attachmentPath = await GetReadableFile(mediaSource.Path, inputFiles, mediaSource.Protocol, mediaAttachment, cancellationToken).ConfigureAwait(false);
|
||||||
var stream = await GetAttachmentStream(attachmentPath, cancellationToken).ConfigureAwait(false);
|
var stream = await GetAttachmentStream(attachmentPath, cancellationToken).ConfigureAwait(false);
|
||||||
return stream;
|
return stream;
|
||||||
|
|
Loading…
Reference in a new issue