Преглед изворни кода

Use IsHostingContent instead of explicitly checking ContentRoot

Mark Monteiro пре 5 година
родитељ
комит
d95ccbacac
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      Jellyfin.Server/Program.cs
  2. 2 2
      MediaBrowser.Model/Configuration/ServerConfiguration.cs

+ 1 - 1
Jellyfin.Server/Program.cs

@@ -268,7 +268,7 @@ namespace Jellyfin.Server
                 .UseStartup<Startup>();
                 .UseStartup<Startup>();
 
 
             // Set the root directory for static content, if one exists
             // Set the root directory for static content, if one exists
-            if (!string.IsNullOrEmpty(appHost.ContentRoot))
+            if (appHost.IsHostingContent)
             {
             {
                 webhostBuilder.UseContentRoot(appHost.ContentRoot);
                 webhostBuilder.UseContentRoot(appHost.ContentRoot);
             }
             }

+ 2 - 2
MediaBrowser.Model/Configuration/ServerConfiguration.cs

@@ -149,9 +149,9 @@ namespace MediaBrowser.Model.Configuration
         public bool EnableDashboardResponseCaching { get; set; }
         public bool EnableDashboardResponseCaching { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Allows the dashboard to be served from a custom path.
+        /// Gets or sets a custom path to serve the dashboard from.
         /// </summary>
         /// </summary>
-        /// <value>The dashboard source path.</value>
+        /// <value>The dashboard source path, or null if the default path should be used.</value>
         public string DashboardSourcePath { get; set; }
         public string DashboardSourcePath { get; set; }
 
 
         /// <summary>
         /// <summary>