From d9f94129555d3360eac4f18fe15fdb59c65a83d5 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Fri, 17 Jul 2020 12:58:23 +0100 Subject: [PATCH] Update DlnaServerService.cs --- Emby.Dlna/Api/DlnaServerService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Emby.Dlna/Api/DlnaServerService.cs b/Emby.Dlna/Api/DlnaServerService.cs index 7fba2184a..167996eeb 100644 --- a/Emby.Dlna/Api/DlnaServerService.cs +++ b/Emby.Dlna/Api/DlnaServerService.cs @@ -127,11 +127,14 @@ namespace Emby.Dlna.Api public DlnaServerService( IDlnaManager dlnaManager, IHttpResultFactory httpResultFactory, - IServerConfigurationManager configurationManager) + IServerConfigurationManager configurationManager, + IHttpContextAccessor httpContextAccessor) { _dlnaManager = dlnaManager; _resultFactory = httpResultFactory; _configurationManager = configurationManager; + object request = httpContextAccessor?.HttpContext.Items["ServiceStackRequest"] ?? throw new ArgumentNullException(nameof(httpContextAccessor)); + Request = (IRequest)request; } private string GetHeader(string name)