diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-04-25 16:02:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-25 16:02:39 +0200 |
| commit | f81833693d0cae476d923f704451bb794a78da8a (patch) | |
| tree | 3c3a407d5fbe5d09b05ac278b79c0bb67e6360ee /Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs | |
| parent | 3c366954ae123e37ea4c6e6b38b7cc0968f66071 (diff) | |
| parent | f5f990154456af149b60f7436fbdf6ac0c2281f4 (diff) | |
Merge pull request #2874 from barronpm/warnings-cleanup1
Emby.Server.Implementations code cleanup and warning fixes (Part 1)
Diffstat (limited to 'Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs index f407317ec..0ff70deca 100644 --- a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -69,21 +69,16 @@ namespace Emby.Server.Implementations.Configuration /// </summary> 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) + ? Path.Combine(ApplicationPaths.ProgramDataPath, "metadata") + : Configuration.MetadataPath; } /// <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; |
