Small changes including #666

This commit is contained in:
Jamie.Rees 2016-11-18 09:07:11 +00:00
parent 39888a4b94
commit f73d12e095
7 changed files with 38 additions and 47 deletions

View file

@ -59,11 +59,15 @@ namespace PlexRequests.UI
var baseUrl = result.MapResult(
o => o.BaseUrl,
e => string.Empty);
var port = result.MapResult(
x => x.Port,
e => -1);
var listenerPrefix = result.MapResult(
x => x.ListenerPrefix,
e => string.Empty);
var updated = result.MapResult(x => x.Updated, e => UpdateValue.None);
CheckUpdate(updated);
@ -81,7 +85,12 @@ namespace PlexRequests.UI
if (port == -1 || port == 3579)
port = GetStartupPort();
var options = new StartOptions(Debugger.IsAttached ? $"http://localhost:{port}" : $"http://+:{port}")
if (string.IsNullOrEmpty(listenerPrefix))
{
listenerPrefix = "+";
}
var options = new StartOptions(Debugger.IsAttached ? $"http://localhost:{port}" : $"http://{listenerPrefix}:{port}")
{
ServerFactory = "Microsoft.Owin.Host.HttpListener"
};