Add configuration flag for Web directory
This commit is contained in:
parent
4b91c9bf66
commit
93d15cd969
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -264,6 +264,23 @@ namespace Jellyfin.Server
|
|||
}
|
||||
}
|
||||
|
||||
// webDir
|
||||
// IF --webdir
|
||||
// ELSE IF $JELLYFIN_WEB_DIR
|
||||
// ELSE use <bindir>/jellyfin-web
|
||||
var webDir = options.WebDir;
|
||||
|
||||
if (string.IsNullOrEmpty(webDir))
|
||||
{
|
||||
webDir = Environment.GetEnvironmentVariable("JELLYFIN_WEB_DIR");
|
||||
|
||||
if (string.IsNullOrEmpty(webDir))
|
||||
{
|
||||
// Use default location under ResourcesPath
|
||||
webDir = Path.Combine(AppContext.BaseDirectory, "jellyfin-web")
|
||||
}
|
||||
}
|
||||
|
||||
// logDir
|
||||
// IF --logdir
|
||||
// ELSE IF $JELLYFIN_LOG_DIR
|
||||
|
@ -296,7 +313,7 @@ namespace Jellyfin.Server
|
|||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
return new ServerApplicationPaths(dataDir, logDir, configDir, cacheDir);
|
||||
return new ServerApplicationPaths(dataDir, logDir, configDir, cacheDir, webDir);
|
||||
}
|
||||
|
||||
private static async Task<IConfiguration> CreateConfiguration(IApplicationPaths appPaths)
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Jellyfin.Server
|
|||
[Option('d', "datadir", Required = false, HelpText = "Path to use for the data folder (database files, etc.).")]
|
||||
public string DataDir { get; set; }
|
||||
|
||||
[Option('w', "webdir", Required = false, HelpText = "Path to the Jellyfin web resources.")]
|
||||
public string WebDir { get; set; }
|
||||
|
||||
[Option('C', "cachedir", Required = false, HelpText = "Path to use for caching.")]
|
||||
public string CacheDir { get; set; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user