web client re-org

This commit is contained in:
Luke Pulverenti
2014-05-01 22:54:33 -04:00
parent c741082dfd
commit c7c72dd1a8
12 changed files with 95 additions and 28 deletions

View File

@@ -41,10 +41,8 @@ namespace MediaBrowser.Server.Mono
var applicationPath = Assembly.GetEntryAssembly ().Location;
#endif
var commandArgs = Environment.GetCommandLineArgs();
// Allow this to be specified on the command line.
var customProgramDataPath = commandArgs.ElementAtOrDefault(1);
var customProgramDataPath = ParseCommandLine();
var appPaths = CreateApplicationPaths(applicationPath, customProgramDataPath);
@@ -75,6 +73,20 @@ namespace MediaBrowser.Server.Mono
_appHost.Dispose();
}
}
private static string ParseCommandLine()
{
var commandArgs = Environment.GetCommandLineArgs().ToList();
var programDataPathIndex = commandArgs.IndexOf("-programdata");
if (programDataPathIndex != -1)
{
return commandArgs.ElementAtOrDefault(programDataPathIndex + 1);
}
return null;
}
private static ServerApplicationPaths CreateApplicationPaths(string applicationPath, string programDataPath)
{