Support MediaAttachment retrieval in MediaSourceManager.

This commit is contained in:
Andrew Mahone 2019-10-07 07:53:28 -04:00
parent 03ecf57548
commit 1513c76a3e
2 changed files with 45 additions and 0 deletions

View File

@ -128,6 +128,32 @@ namespace Emby.Server.Implementations.Library
return streams;
}
public List<MediaAttachment> GetMediaAttachments(MediaAttachmentQuery query)
{
var list = _itemRepo.GetMediaAttachments(query);
return list;
}
public List<MediaAttachment> GetMediaAttachments(string mediaSourceId)
{
var list = GetMediaAttachments(new MediaAttachmentQuery
{
ItemId = new Guid(mediaSourceId)
});
return list;
}
public List<MediaAttachment> GetMediaAttachments(Guid itemId)
{
var list = GetMediaAttachments(new MediaAttachmentQuery
{
ItemId = itemId
});
return list;
}
public async Task<List<MediaSourceInfo>> GetPlayackMediaSources(BaseItem item, User user, bool allowMediaProbe, bool enablePathSubstitution, CancellationToken cancellationToken)
{
var mediaSources = GetStaticMediaSources(item, enablePathSubstitution, user);

View File

@ -38,6 +38,25 @@ namespace MediaBrowser.Controller.Library
/// <returns>IEnumerable&lt;MediaStream&gt;.</returns>
List<MediaStream> GetMediaStreams(MediaStreamQuery query);
/// <summary>
/// Gets the media attachments.
/// </summary>
/// <param name="">The item identifier.</param>
/// <returns>IEnumerable&lt;MediaAttachment&gt;.</returns>
List<MediaAttachment> GetMediaAttachments(Guid itemId);
/// <summary>
/// Gets the media attachments.
/// </summary>
/// <param name="">The The media source identifier.</param>
/// <returns>IEnumerable&lt;MediaAttachment&gt;.</returns>
List<MediaAttachment> GetMediaAttachments(string mediaSourceId);
/// <summary>
/// Gets the media attachments.
/// </summary>
/// <param name="">The query.</param>
/// <returns>IEnumerable&lt;MediaAttachment&gt;.</returns>
List<MediaAttachment> GetMediaAttachments(MediaAttachmentQuery query);
/// <summary>
/// Gets the playack media sources.
/// </summary>