mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
Fixed #154
This commit is contained in:
parent
3261bdbf9b
commit
7679a13254
3 changed files with 23 additions and 6 deletions
|
@ -25,6 +25,8 @@
|
|||
// ************************************************************************/
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Microsoft.Owin.Hosting;
|
||||
|
||||
using Mono.Data.Sqlite;
|
||||
|
@ -39,6 +41,11 @@ using PlexRequests.Store;
|
|||
using PlexRequests.Store.Repository;
|
||||
using System.Diagnostics;
|
||||
|
||||
using FluentScheduler;
|
||||
|
||||
using PlexRequests.Services;
|
||||
using PlexRequests.UI.Jobs;
|
||||
|
||||
namespace PlexRequests.UI
|
||||
{
|
||||
class Program
|
||||
|
@ -85,6 +92,9 @@ namespace PlexRequests.UI
|
|||
s.CacheQualityProfiles();
|
||||
ConfigureTargets(cn);
|
||||
|
||||
SetupSchedulers();
|
||||
|
||||
|
||||
|
||||
if (port == -1)
|
||||
port = GetStartupPort();
|
||||
|
@ -132,7 +142,7 @@ namespace PlexRequests.UI
|
|||
private static int GetStartupPort()
|
||||
{
|
||||
Log.Trace("Getting startup Port");
|
||||
var port = 3579;
|
||||
var port = 8080;
|
||||
var service = new SettingsServiceV2<PlexRequestSettings>(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
|
||||
var settings = service.GetSettings();
|
||||
Log.Trace("Port: {0}", settings.Port);
|
||||
|
@ -148,5 +158,12 @@ namespace PlexRequests.UI
|
|||
{
|
||||
LoggingHelper.ConfigureLogging(connectionString);
|
||||
}
|
||||
|
||||
private static void SetupSchedulers()
|
||||
{
|
||||
TaskManager.TaskFactory = new PlexTaskFactory();
|
||||
TaskManager.Initialize(new PlexRegistry());
|
||||
TaskManager.Initialize(new MediaCacheRegistry());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue