mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
Apply suggestions from code review
This commit is contained in:
parent
ca85bef7c5
commit
861bad1eda
@ -29,7 +29,7 @@ namespace MediaBrowser.Controller.Extensions
|
||||
public const string PlaylistsAllowDuplicatesKey = "playlists:allowDuplicates";
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the application should not host static web content from the <see cref="IConfiguration"/>.
|
||||
/// Gets a value indicating whether the application should host static web content from the <see cref="IConfiguration"/>.
|
||||
/// </summary>
|
||||
/// <param name="configuration">The configuration to retrieve the value from.</param>
|
||||
/// <returns>The parsed config value.</returns>
|
||||
|
@ -135,20 +135,6 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
_serverConfigurationManager = serverConfigurationManager;
|
||||
_fileSystem = fileSystem;
|
||||
_resultFactory = resultFactory;
|
||||
|
||||
// If hosting the web client, validate the client content path
|
||||
if (appConfig.HostWebClient())
|
||||
{
|
||||
string webContentPath = DashboardUIPath;
|
||||
if (!Directory.Exists(webContentPath) || Directory.GetFiles(webContentPath).Length == 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"The server is expected to host the web client, but the provided content directory is either " +
|
||||
$"invalid or empty: {webContentPath}. If you do not want to host the web client with the " +
|
||||
"server, you may set the '--nowebclient' command line flag, or set" +
|
||||
$"'{Controller.Extensions.ConfigurationExtensions.HostWebClientKey}=false' in your config settings.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user