diff options
Diffstat (limited to 'Jellyfin.Api/Controllers/SystemController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SystemController.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/SystemController.cs b/Jellyfin.Api/Controllers/SystemController.cs index 4cb1984a2..6876b47b4 100644 --- a/Jellyfin.Api/Controllers/SystemController.cs +++ b/Jellyfin.Api/Controllers/SystemController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.IO; @@ -8,6 +8,7 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; +using Jellyfin.Networking.Manager; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; @@ -64,9 +65,9 @@ namespace Jellyfin.Api.Controllers [HttpGet("Info")] [Authorize(Policy = Policies.FirstTimeSetupOrIgnoreParentalControl)] [ProducesResponseType(StatusCodes.Status200OK)] - public async Task<ActionResult<SystemInfo>> GetSystemInfo() + public ActionResult<SystemInfo> GetSystemInfo() { - return await _appHost.GetSystemInfo(CancellationToken.None).ConfigureAwait(false); + return _appHost.GetSystemInfo(Request.HttpContext.Connection.RemoteIpAddress); } /// <summary> @@ -76,9 +77,9 @@ namespace Jellyfin.Api.Controllers /// <returns>A <see cref="PublicSystemInfo"/> with public info about the system.</returns> [HttpGet("Info/Public")] [ProducesResponseType(StatusCodes.Status200OK)] - public async Task<ActionResult<PublicSystemInfo>> GetPublicSystemInfo() + public ActionResult<PublicSystemInfo> GetPublicSystemInfo() { - return await _appHost.GetPublicSystemInfo(CancellationToken.None).ConfigureAwait(false); + return _appHost.GetPublicSystemInfo(Request.HttpContext.Connection.RemoteIpAddress); } /// <summary> |
