diff options
| author | Bond_009 <Bond.009@outlook.com> | 2020-05-27 20:49:18 +0200 |
|---|---|---|
| committer | Bond_009 <Bond.009@outlook.com> | 2020-05-27 20:49:18 +0200 |
| commit | 7439e095e276034f05a0c9e9c7687b4a0aa1b3e5 (patch) | |
| tree | c1c0a8f64157cac9117e3a885f7308802a5a98d8 /Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs | |
| parent | 27ce10d0c13bc30fa1b08682e13bab67784b289d (diff) | |
| parent | 777c9c7bc974fafb09e6a5a6b23bd29cf8529af9 (diff) | |
Merge branch 'master' into nullable3
Diffstat (limited to 'Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs index 5062683a1..94ee1ced7 100644 --- a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -67,23 +67,22 @@ namespace Emby.Server.Implementations.Configuration /// <summary> /// Updates the metadata path. /// </summary> + /// <exception cref="UnauthorizedAccessException">If the directory does not exist, and the caller does not have the required permission to create it.</exception> + /// <exception cref="NotSupportedException">If there is a custom path transcoding path specified, but it is invalid.</exception> + /// <exception cref="IOException">If the directory does not exist, and it also could not be created.</exception> private void UpdateMetadataPath() { - if (string.IsNullOrWhiteSpace(Configuration.MetadataPath)) - { - ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = Path.Combine(ApplicationPaths.ProgramDataPath, "metadata"); - } - else - { - ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = Configuration.MetadataPath; - } + ((ServerApplicationPaths)ApplicationPaths).InternalMetadataPath = string.IsNullOrWhiteSpace(Configuration.MetadataPath) + ? ApplicationPaths.DefaultInternalMetadataPath + : Configuration.MetadataPath; + Directory.CreateDirectory(ApplicationPaths.InternalMetadataPath); } /// <summary> /// Replaces the configuration. /// </summary> /// <param name="newConfiguration">The new configuration.</param> - /// <exception cref="DirectoryNotFoundException"></exception> + /// <exception cref="DirectoryNotFoundException">If the configuration path doesn't exist.</exception> public override void ReplaceConfiguration(BaseApplicationConfiguration newConfiguration) { var newConfig = (ServerConfiguration)newConfiguration; @@ -194,12 +193,6 @@ namespace Emby.Server.Implementations.Configuration changed = true; } - if (!config.CameraUploadUpgraded) - { - config.CameraUploadUpgraded = true; - changed = true; - } - if (!config.CollectionsUpgraded) { config.CollectionsUpgraded = true; |
