Made the base better

This commit is contained in:
tidusjar 2016-04-08 14:16:06 +01:00
parent 1af3c21655
commit 75d3c40fcf

View file

@ -50,18 +50,28 @@ namespace PlexRequests.UI
var port = -1; var port = -1;
if (args.Length > 0) if (args.Length > 0)
{ {
Log.Info("We are going to use port {0} that was passed in", args[0]); foreach (var a in args)
int portResult;
if (!int.TryParse(args[0], out portResult))
{ {
Console.WriteLine("Didn't pass in a port"); if (a.StartsWith("-base", StringComparison.CurrentCultureIgnoreCase))
Console.WriteLine("Must be the URL Base"); {
assetLocation = args[0]; Console.WriteLine("Settings URL Base");
} assetLocation = args[0];
else }
{ else
port = portResult; {
Log.Info("We are going to use port {0} that was passed in", a);
int portResult;
if (!int.TryParse(a, out portResult))
{
Console.WriteLine("Didn't pass in a port");
}
else
{
port = portResult;
}
}
} }
} }
Log.Trace("Getting product version"); Log.Trace("Getting product version");
WriteOutVersion(); WriteOutVersion();