mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
fix: use HttpContext and ClaimsPrincipal instead of IAuthorizationContext
This commit is contained in:
@@ -43,7 +43,6 @@ namespace Jellyfin.Api.Controllers
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IDtoService _dtoService;
|
||||
private readonly IDlnaManager _dlnaManager;
|
||||
private readonly IAuthorizationContext _authContext;
|
||||
private readonly IMediaSourceManager _mediaSourceManager;
|
||||
private readonly IServerConfigurationManager _serverConfigurationManager;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
@@ -61,7 +60,6 @@ namespace Jellyfin.Api.Controllers
|
||||
/// <param name="userManager">Instance of the <see cref="IUserManager"/> interface.</param>
|
||||
/// <param name="dtoService">Instance of the <see cref="IDtoService"/> interface.</param>
|
||||
/// <param name="dlnaManager">Instance of the <see cref="IDlnaManager"/> interface.</param>
|
||||
/// <param name="authContext">Instance of the <see cref="IAuthorizationContext"/> interface.</param>
|
||||
/// <param name="mediaSourceManager">Instance of the <see cref="IMediaSourceManager"/> interface.</param>
|
||||
/// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
|
||||
/// <param name="mediaEncoder">Instance of the <see cref="IMediaEncoder"/> interface.</param>
|
||||
@@ -74,7 +72,6 @@ namespace Jellyfin.Api.Controllers
|
||||
IUserManager userManager,
|
||||
IDtoService dtoService,
|
||||
IDlnaManager dlnaManager,
|
||||
IAuthorizationContext authContext,
|
||||
IMediaSourceManager mediaSourceManager,
|
||||
IServerConfigurationManager serverConfigurationManager,
|
||||
IMediaEncoder mediaEncoder,
|
||||
@@ -87,7 +84,6 @@ namespace Jellyfin.Api.Controllers
|
||||
_userManager = userManager;
|
||||
_dtoService = dtoService;
|
||||
_dlnaManager = dlnaManager;
|
||||
_authContext = authContext;
|
||||
_mediaSourceManager = mediaSourceManager;
|
||||
_serverConfigurationManager = serverConfigurationManager;
|
||||
_mediaEncoder = mediaEncoder;
|
||||
@@ -120,7 +116,7 @@ namespace Jellyfin.Api.Controllers
|
||||
: _libraryManager.GetItemById(itemId);
|
||||
|
||||
var dtoOptions = new DtoOptions();
|
||||
dtoOptions = dtoOptions.AddClientFields(Request);
|
||||
dtoOptions = dtoOptions.AddClientFields(User);
|
||||
|
||||
BaseItemDto[] items;
|
||||
if (item is Video video)
|
||||
@@ -429,8 +425,7 @@ namespace Jellyfin.Api.Controllers
|
||||
|
||||
var state = await StreamingHelpers.GetStreamingState(
|
||||
streamingRequest,
|
||||
Request,
|
||||
_authContext,
|
||||
HttpContext,
|
||||
_mediaSourceManager,
|
||||
_userManager,
|
||||
_libraryManager,
|
||||
|
||||
Reference in New Issue
Block a user