diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-07 14:38:50 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-07 14:38:50 -0400 |
| commit | 9e4b34a4b1baebf611b615ead6018c15c4536820 (patch) | |
| tree | 7de3528eaad24dce030d3a383a91a2a612b7fed0 /MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs | |
| parent | 0d025f7fb620bf2a24ca9aa4e5994f132e02e7c0 (diff) | |
add basic open subtitle configuration
Diffstat (limited to 'MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs index da3861682..ab79c6a1a 100644 --- a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -1,4 +1,5 @@ using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Events; using MediaBrowser.Common.Implementations.Configuration; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; @@ -29,6 +30,8 @@ namespace MediaBrowser.Server.Implementations.Configuration UpdateMetadataPath(); } + public event EventHandler<GenericEventArgs<ServerConfiguration>> ConfigurationUpdating; + /// <summary> /// Gets the type of the configuration. /// </summary> @@ -73,8 +76,8 @@ namespace MediaBrowser.Server.Implementations.Configuration /// </summary> private void UpdateItemsByNamePath() { - ((ServerApplicationPaths) ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ? - null : + ((ServerApplicationPaths)ApplicationPaths).ItemsByNamePath = string.IsNullOrEmpty(Configuration.ItemsByNamePath) ? + null : Configuration.ItemsByNamePath; } @@ -105,13 +108,15 @@ namespace MediaBrowser.Server.Implementations.Configuration /// <exception cref="System.IO.DirectoryNotFoundException"></exception> public override void ReplaceConfiguration(BaseApplicationConfiguration newConfiguration) { - var newConfig = (ServerConfiguration) newConfiguration; + var newConfig = (ServerConfiguration)newConfiguration; ValidateItemByNamePath(newConfig); ValidateTranscodingTempPath(newConfig); ValidatePathSubstitutions(newConfig); ValidateMetadataPath(newConfig); + EventHelper.FireEventIfNotNull(ConfigurationUpdating, this, new GenericEventArgs<ServerConfiguration> { Argument = newConfig }, Logger); + base.ReplaceConfiguration(newConfiguration); } |
