pull/14/head
Jamie Rees 9 years ago
parent de84f0f191
commit 601a377d97

@ -385,6 +385,11 @@
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets'))" /> <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target> </Target>
<Import Project="..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets')" /> <Import Project="..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.99.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="RemoveSatelliteAssemblies" AfterTargets="ResolveAssemblyReferences">
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceSatellitePaths)" />
</ItemGroup>
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

@ -59,7 +59,7 @@ namespace PlexRequests.UI
Console.ReadLine(); Console.ReadLine();
Environment.Exit(1); Environment.Exit(1);
} }
uri = $"http://localhost:{portResult}"; uri = $"http://*:{portResult}";
} }
Log.Trace("Getting product version"); Log.Trace("Getting product version");
@ -70,9 +70,14 @@ namespace PlexRequests.UI
if (string.IsNullOrEmpty(uri)) if (string.IsNullOrEmpty(uri))
uri = GetStartupUri(); uri = GetStartupUri();
StartOptions options = new StartOptions();
var newPort = GetPort(); ;
options.Urls.Add($"http://*:{newPort}"); var options = new StartOptions(uri)
{
ServerFactory = "Microsoft.Owin.Host.HttpListener"
};
try
{
using (WebApp.Start<Startup>(options)) using (WebApp.Start<Startup>(options))
{ {
@ -80,6 +85,13 @@ var newPort = GetPort();
Console.WriteLine("Press any key to exit"); Console.WriteLine("Press any key to exit");
Console.ReadLine(); Console.ReadLine();
} }
}
catch (Exception e)
{
var a = e.Message;
throw;
}
} }
private static void WriteOutVersion() private static void WriteOutVersion()
@ -92,28 +104,18 @@ var newPort = GetPort();
private static string GetStartupUri() private static string GetStartupUri()
{ {
Log.Trace("Getting startup URI"); Log.Trace("Getting startup URI");
var uri = "http://localhost:3579/"; var uri = "http://*:3579/";
var service = new SettingsServiceV2<PlexRequestSettings>(new JsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider())); var service = new SettingsServiceV2<PlexRequestSettings>(new JsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
var settings = service.GetSettings(); var settings = service.GetSettings();
Log.Trace("Port: {0}", settings.Port); Log.Trace("Port: {0}", settings.Port);
if (settings.Port != 0) if (settings.Port != 0)
{ {
uri = $"http://localhost:{settings.Port}"; uri = $"http://*:{settings.Port}";
} }
return uri; return uri;
} }
private static int GetPort()
{
var service = new SettingsServiceV2<PlexRequestSettings>(new JsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
var settings = service.GetSettings();
return settings.Port;
}
private static void ConfigureTargets(string connectionString) private static void ConfigureTargets(string connectionString)
{ {
LogManager.ThrowExceptions = true; LogManager.ThrowExceptions = true;

@ -3,9 +3,9 @@ configuration: Release
assembly_info: assembly_info:
patch: true patch: true
file: '**\AssemblyInfo.*' file: '**\AssemblyInfo.*'
assembly_version: '1.2.0' assembly_version: '1.2.1'
assembly_file_version: '{version}' assembly_file_version: '{version}'
assembly_informational_version: '1.2.0' assembly_informational_version: '1.2.1'
before_build: before_build:
- cmd: appveyor-retry nuget restore - cmd: appveyor-retry nuget restore
build: build:

Loading…
Cancel
Save