mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-15 23:02:18 +01:00
Merge branch 'master' into warn12
This commit is contained in:
@@ -1097,6 +1097,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
Id = item.Id.ToString("N", CultureInfo.InvariantCulture),
|
||||
Protocol = protocol ?? MediaProtocol.File,
|
||||
MediaStreams = MediaSourceManager.GetMediaStreams(item.Id),
|
||||
MediaAttachments = MediaSourceManager.GetMediaAttachments(item.Id),
|
||||
Name = GetMediaSourceName(item),
|
||||
Path = enablePathSubstitution ? GetMappedPath(item, item.Path, protocol) : item.Path,
|
||||
RunTimeTicks = item.RunTimeTicks,
|
||||
|
||||
@@ -71,13 +71,15 @@ namespace MediaBrowser.Controller
|
||||
/// <summary>
|
||||
/// Gets the local API URL.
|
||||
/// </summary>
|
||||
/// <param name="host">The host.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
string GetLocalApiUrl(string host);
|
||||
/// <param name="hostname">The hostname.</param>
|
||||
/// <returns>The local API URL.</returns>
|
||||
string GetLocalApiUrl(ReadOnlySpan<char> hostname);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the local API URL.
|
||||
/// </summary>
|
||||
/// <param name="address">The IP address.</param>
|
||||
/// <returns>The local API URL.</returns>
|
||||
string GetLocalApiUrl(IPAddress address);
|
||||
|
||||
void LaunchUrl(string url);
|
||||
|
||||
@@ -38,6 +38,20 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <returns>IEnumerable<MediaStream>.</returns>
|
||||
List<MediaStream> GetMediaStreams(MediaStreamQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the media attachments.
|
||||
/// </summary>
|
||||
/// <param name="itemId">The item identifier.</param>
|
||||
/// <returns>IEnumerable<MediaAttachment>.</returns>
|
||||
List<MediaAttachment> GetMediaAttachments(Guid itemId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the media attachments.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <returns>IEnumerable<MediaAttachment>.</returns>
|
||||
List<MediaAttachment> GetMediaAttachments(MediaAttachmentQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the playack media sources.
|
||||
/// </summary>
|
||||
|
||||
@@ -102,8 +102,6 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="ArgumentNullException">user</exception>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
void DeleteUser(User user);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -78,6 +78,21 @@ namespace MediaBrowser.Controller.Persistence
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void SaveMediaStreams(Guid id, List<MediaStream> streams, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the media attachments.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <returns>IEnumerable{MediaAttachment}.</returns>
|
||||
List<MediaAttachment> GetMediaAttachments(MediaAttachmentQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Saves the media attachments.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="attachments">The attachments.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void SaveMediaAttachments(Guid id, IReadOnlyList<MediaAttachment> attachments, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the item ids.
|
||||
/// </summary>
|
||||
|
||||
20
MediaBrowser.Controller/Persistence/MediaAttachmentQuery.cs
Normal file
20
MediaBrowser.Controller/Persistence/MediaAttachmentQuery.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Controller.Persistence
|
||||
{
|
||||
public class MediaAttachmentQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the index.
|
||||
/// </summary>
|
||||
/// <value>The index.</value>
|
||||
public int? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item identifier.
|
||||
/// </summary>
|
||||
/// <value>The item identifier.</value>
|
||||
public Guid ItemId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user