Merge pull request #1092 from joshuaboniface/configurable-webdir

Add configurable webdir option
This commit is contained in:
Joshua M. Boniface
2019-03-12 12:51:11 -04:00
committed by GitHub
8 changed files with 50 additions and 6 deletions

View File

@@ -17,12 +17,14 @@ namespace Emby.Server.Implementations.AppBase
string programDataPath,
string logDirectoryPath,
string configurationDirectoryPath,
string cacheDirectoryPath)
string cacheDirectoryPath,
string webDirectoryPath)
{
ProgramDataPath = programDataPath;
LogDirectoryPath = logDirectoryPath;
ConfigurationDirectoryPath = configurationDirectoryPath;
CachePath = cacheDirectoryPath;
WebPath = webDirectoryPath;
DataPath = Path.Combine(ProgramDataPath, "data");
}
@@ -33,6 +35,12 @@ namespace Emby.Server.Implementations.AppBase
/// <value>The program data path.</value>
public string ProgramDataPath { get; private set; }
/// <summary>
/// Gets the path to the web UI resources folder
/// </summary>
/// <value>The web UI resources path.</value>
public string WebPath { get; set; }
/// <summary>
/// Gets the path to the system folder
/// </summary>

View File

@@ -617,7 +617,7 @@ namespace Emby.Server.Implementations
string contentRoot = ServerConfigurationManager.Configuration.DashboardSourcePath;
if (string.IsNullOrEmpty(contentRoot))
{
contentRoot = Path.Combine(ServerConfigurationManager.ApplicationPaths.ApplicationResourcesPath, "jellyfin-web", "src");
contentRoot = ServerConfigurationManager.ApplicationPaths.WebPath;
}
var host = new WebHostBuilder()
@@ -914,6 +914,7 @@ namespace Emby.Server.Implementations
logger.LogInformation("User Interactive: {IsUserInteractive}", Environment.UserInteractive);
logger.LogInformation("Processor count: {ProcessorCount}", Environment.ProcessorCount);
logger.LogInformation("Program data path: {ProgramDataPath}", appPaths.ProgramDataPath);
logger.LogInformation("Web resources path: {WebPath}", appPaths.WebPath);
logger.LogInformation("Application directory: {ApplicationPath}", appPaths.ProgramSystemPath);
}
@@ -1386,6 +1387,7 @@ namespace Emby.Server.Implementations
CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
Id = SystemId,
ProgramDataPath = ApplicationPaths.ProgramDataPath,
WebPath = ApplicationPaths.WebPath,
LogPath = ApplicationPaths.LogDirectoryPath,
ItemsByNamePath = ApplicationPaths.InternalMetadataPath,
InternalMetadataPath = ApplicationPaths.InternalMetadataPath,

View File

@@ -17,11 +17,13 @@ namespace Emby.Server.Implementations
string programDataPath,
string logDirectoryPath,
string configurationDirectoryPath,
string cacheDirectoryPath)
string cacheDirectoryPath,
string webDirectoryPath)
: base(programDataPath,
logDirectoryPath,
configurationDirectoryPath,
cacheDirectoryPath)
cacheDirectoryPath,
webDirectoryPath)
{
}