From 124bd4c2c03874f5b4de241e3d89ac95f6048b9a Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Sat, 21 Nov 2020 12:59:14 +0000 Subject: Networking: 1 - Network Manager (#4124) * NetworkManager * Config file with additional options. * Update Jellyfin.Networking/Manager/INetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/INetworkManager.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Model/Configuration/ServerConfiguration.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Model/Configuration/ServerConfiguration.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Model/Configuration/ServerConfiguration.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Split function. * Update Jellyfin.Networking/Manager/INetworkManager.cs Co-authored-by: Cody Robibero * fixed iterations * Update Jellyfin.Networking.csproj * Update NetworkManager.cs * Updated to NetCollection 1.03. * Update ServerConfiguration.cs * Update StartupController.cs * Update INetworkManager.cs Removed public * Update INetworkManager.cs * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Updated comment * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Update Jellyfin.Networking/Manager/INetworkManager.cs Co-authored-by: Claus Vium * Remove mono code. Removed forced chromecast option * Inverted if * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Moved config into a separate container * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Changed sortedList to dictionary. * Update INetworkManager.cs Changed UpdateSettings param type * Update NetworkManager.cs * Update NetworkManager.cs * Update NetworkManager.cs * Update NetworkConfiguration.cs * Update INetworkManager.cs * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Update MediaBrowser.Model/Configuration/ServerConfiguration.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Model/Configuration/ServerConfiguration.cs Co-authored-by: Cody Robibero * Updated changes github didn't update. * Fixed compilation. * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Removed read locking. * Update NetworkManager.cs Changed configuration event to NamedConfigurationUpdated * updated comment * removed whitespace * Updated NetCollection to 1.0.6 Updated DXCopAnalyser to 3.3.1 * removed NetCollection * Update NetworkManager.cs * Update NetworkExtensions.cs * Update NetworkExtensions.cs Removed function. * Update NetworkExtensions.cs * Update NetworkManager.cs Changed ToString() to AsString() as native collection formats incorrectly. * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update NetworkExtensions.cs * Update Jellyfin.Networking/Configuration/NetworkConfiguration.cs Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> * Update Jellyfin.Networking/Configuration/NetworkConfiguration.cs Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> * Update Jellyfin.Networking/Configuration/NetworkConfiguration.cs Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> * Update MediaBrowser.Common/Net/IPObject.cs Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> * updated * Replaced NetCollection with Collection * Update MediaBrowser.Common/Net/NetworkExtensions.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Model/Configuration/PathSubstitution.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/NetworkExtensions.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPObject.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPObject.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPObject.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPHost.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPHost.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPHost.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPHost.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPHost.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPHost.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPHost.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPObject.cs Co-authored-by: Cody Robibero * Update MediaBrowser.Common/Net/IPObject.cs Co-authored-by: Cody Robibero * updated comments. * Updated comments / changes as suggested by @crobibero. * Split function as suggested * Fixed null ref. * Updated comment. * Updated cs to .net5 * Fixed issue with PublishedServerUrl * Fixes * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Restored locking * optimisation * Added comment * updates. * updated. * updates * updated. * Update IPHost.cs * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Claus Vium * Update NetworkManager.cs * Removed whitespace. * Added debug logging * Added debug. * Update Jellyfin.Networking/Manager/NetworkManager.cs Co-authored-by: Bond-009 * Replaced GetAddressBytes Co-authored-by: Cody Robibero Co-authored-by: Claus Vium Co-authored-by: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Co-authored-by: Bond-009 --- Jellyfin.Api/Controllers/StartupController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Jellyfin.Api/Controllers/StartupController.cs') diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs index 9c259cc19..e59c6e1dd 100644 --- a/Jellyfin.Api/Controllers/StartupController.cs +++ b/Jellyfin.Api/Controllers/StartupController.cs @@ -72,9 +72,9 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult UpdateInitialConfiguration([FromBody, Required] StartupConfigurationDto startupConfiguration) { - _config.Configuration.UICulture = startupConfiguration.UICulture; - _config.Configuration.MetadataCountryCode = startupConfiguration.MetadataCountryCode; - _config.Configuration.PreferredMetadataLanguage = startupConfiguration.PreferredMetadataLanguage; + _config.Configuration.UICulture = startupConfiguration.UICulture ?? string.Empty; + _config.Configuration.MetadataCountryCode = startupConfiguration.MetadataCountryCode ?? string.Empty; + _config.Configuration.PreferredMetadataLanguage = startupConfiguration.PreferredMetadataLanguage ?? string.Empty; _config.SaveConfiguration(); return NoContent(); } -- cgit v1.2.3