diff options
| author | Greenback <jimcartlidge@yahoo.co.uk> | 2020-10-08 19:00:55 +0100 |
|---|---|---|
| committer | Greenback <jimcartlidge@yahoo.co.uk> | 2020-10-08 19:00:55 +0100 |
| commit | deb4d27857089e8f3a3602399c5b52ad8df170f2 (patch) | |
| tree | 18c3ec379b72e20843caff9dad907d1842cbcbd8 /Jellyfin.Api/Controllers/ConfigurationController.cs | |
| parent | a3f0843ac97c64a8a412d707baa9870d0e53dcff (diff) | |
Moved all settings across to network.xml
Diffstat (limited to 'Jellyfin.Api/Controllers/ConfigurationController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/ConfigurationController.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/ConfigurationController.cs b/Jellyfin.Api/Controllers/ConfigurationController.cs index e1c9f69f6..09d72e8b1 100644 --- a/Jellyfin.Api/Controllers/ConfigurationController.cs +++ b/Jellyfin.Api/Controllers/ConfigurationController.cs @@ -4,7 +4,9 @@ using System.Text.Json; using System.Threading.Tasks; using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; +using Jellyfin.Api.Migrations; using Jellyfin.Api.Models.ConfigurationDtos; +using Jellyfin.Networking.Configuration; using MediaBrowser.Common.Json; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.MediaEncoding; @@ -49,6 +51,10 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult<ServerConfiguration> GetConfiguration() { + // TODO: Temp workaround until the web can be changed. + var net = _configurationManager.GetNetworkConfiguration(); + ClassMigrationHelper.CopyProperties(net, _configurationManager.Configuration); + return _configurationManager.Configuration; } @@ -64,6 +70,12 @@ namespace Jellyfin.Api.Controllers public ActionResult UpdateConfiguration([FromBody, Required] ServerConfiguration configuration) { _configurationManager.ReplaceConfiguration(configuration); + + // TODO: Temp workaround until the web can be changed. + var network = _configurationManager.GetNetworkConfiguration(); + ClassMigrationHelper.CopyProperties(configuration, network); + _configurationManager.SaveConfiguration("Network", network); + return NoContent(); } |
