aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/StartupController.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2020-11-22 01:11:02 -0500
committerGitHub <noreply@github.com>2020-11-22 01:11:02 -0500
commita57b99bffdf40067465a0dda920fab23ceda1451 (patch)
tree003df6bc0da24bdddeefc8366120cb4d20fc6933 /Jellyfin.Api/Controllers/StartupController.cs
parentc1db8869f06105b13f93f15d12061ada523dbb78 (diff)
parent2c9e355e428e1498d4dc3bce844917a1a0333284 (diff)
Merge pull request #4125 from BaronGreenback/NetworkPR2
Networking 2 (Cumulative PR) - Swapping over to new NetworkManager
Diffstat (limited to 'Jellyfin.Api/Controllers/StartupController.cs')
-rw-r--r--Jellyfin.Api/Controllers/StartupController.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs
index e59c6e1dd..d9cb34557 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -3,6 +3,7 @@ using System.Linq;
using System.Threading.Tasks;
using Jellyfin.Api.Constants;
using Jellyfin.Api.Models.StartupDtos;
+using Jellyfin.Networking.Configuration;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Library;
using Microsoft.AspNetCore.Authorization;
@@ -89,9 +90,10 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult SetRemoteAccess([FromBody, Required] StartupRemoteAccessDto startupRemoteAccessDto)
{
- _config.Configuration.EnableRemoteAccess = startupRemoteAccessDto.EnableRemoteAccess;
- _config.Configuration.EnableUPnP = startupRemoteAccessDto.EnableAutomaticPortMapping;
- _config.SaveConfiguration();
+ NetworkConfiguration settings = _config.GetNetworkConfiguration();
+ settings.EnableRemoteAccess = startupRemoteAccessDto.EnableRemoteAccess;
+ settings.EnableUPnP = startupRemoteAccessDto.EnableAutomaticPortMapping;
+ _config.SaveConfiguration("network", settings);
return NoContent();
}