浏览代码

Do not add command line flag to the config hierarchy unless it is explicitly set

Mark Monteiro 5 年之前
父节点
当前提交
7dd2f3a8f2
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9 3
      Jellyfin.Server/StartupOptions.cs

+ 9 - 3
Jellyfin.Server/StartupOptions.cs

@@ -81,9 +81,15 @@ namespace Jellyfin.Server
         /// </summary>
         /// <returns>The configuration dictionary.</returns>
         public Dictionary<string, string> ConvertToConfig()
-            => new Dictionary<string, string>
+        {
+            var config = new Dictionary<string, string>();
+
+            if (NoWebContent)
             {
-                { ConfigurationExtensions.NoWebContentKey, NoWebContent.ToString(CultureInfo.InvariantCulture) }
-            };
+                config.Add(ConfigurationExtensions.NoWebContentKey, bool.TrueString);
+            }
+
+            return config;
+        }
     }
 }