diff options
| author | Jim Cartlidge <jimcartlidge@yahoo.co.uk> | 2020-09-12 16:41:37 +0100 |
|---|---|---|
| committer | Jim Cartlidge <jimcartlidge@yahoo.co.uk> | 2020-09-12 16:41:37 +0100 |
| commit | 9ef79d190b2490a03c566bfaaf963fbba7d124a9 (patch) | |
| tree | 4426461a89f2c2610521bf53c808e01d0e8e3db2 /Jellyfin.Api/Controllers/SystemController.cs | |
| parent | 6bf0acb854683377bebad3ca27de17706519c420 (diff) | |
Large number of files
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> |
