mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-08 14:10:50 -07:00
Update Program.cs
This commit is contained in:
parent
9778002da5
commit
8d399c65b9
1 changed files with 14 additions and 1 deletions
|
@ -70,8 +70,11 @@ 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}");
|
||||||
|
|
||||||
using (WebApp.Start<Startup>(uri))
|
using (WebApp.Start<Startup>(options))
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Request Plex is running on {uri}");
|
Console.WriteLine($"Request Plex is running on {uri}");
|
||||||
Console.WriteLine("Press any key to exit");
|
Console.WriteLine("Press any key to exit");
|
||||||
|
@ -101,6 +104,16 @@ namespace PlexRequests.UI
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string 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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue