mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
#254 MOSTLY DONE! At last, this took a while.
So currently if a series exists then we will correctly monitor the episodes selected. TODO: When the series doesn't exist in sonarr we need to add the series and then wait for the episode metadata to be populated. Also need to add in all of the regular checks and notification e.g. whitelist etc.
This commit is contained in:
parent
8b46925f08
commit
b14fd36ecd
21 changed files with 1380 additions and 861 deletions
|
@ -69,14 +69,14 @@ namespace PlexRequests.UI
|
|||
private IKernel _kernel;
|
||||
protected override IKernel GetApplicationContainer()
|
||||
{
|
||||
Debug.WriteLine("GetAppContainer");
|
||||
Debug.WriteLine("GetAppContainer");
|
||||
_kernel.Load<FactoryModule>();
|
||||
return _kernel;
|
||||
}
|
||||
|
||||
protected override void ApplicationStartup(IKernel container, IPipelines pipelines)
|
||||
{
|
||||
Debug.WriteLine("Bootstrapper.ApplicationStartup");
|
||||
Debug.WriteLine("Bootstrapper.ApplicationStartup");
|
||||
ConfigureContainer(container);
|
||||
|
||||
JsonSettings.MaxJsonLength = int.MaxValue;
|
||||
|
@ -119,21 +119,22 @@ namespace PlexRequests.UI
|
|||
#endif
|
||||
protected override void ConfigureConventions(NancyConventions nancyConventions)
|
||||
{
|
||||
Debug.WriteLine("Configuring the conventions");
|
||||
Debug.WriteLine("Configuring the conventions");
|
||||
base.ConfigureConventions(nancyConventions);
|
||||
Debug.WriteLine("Finished BASE");
|
||||
|
||||
var settingsService = new SettingsServiceV2<PlexRequestSettings>(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
|
||||
var settings = settingsService.GetSettings();
|
||||
var assetLocation = settings.BaseUrl ?? string.Empty;
|
||||
var assetLocation = string.Empty;
|
||||
if (!string.IsNullOrEmpty(settings.BaseUrl))
|
||||
{
|
||||
assetLocation = $"{settings.BaseUrl}/";
|
||||
}
|
||||
|
||||
Debug.WriteLine($"AssetLocation {assetLocation}");
|
||||
nancyConventions.StaticContentsConventions.Add(
|
||||
StaticContentConventionBuilder.AddDirectory($"{assetLocation}/Content_{AssemblyHelper.GetProductVersion()}", "Content")
|
||||
);
|
||||
Debug.WriteLine("Added Content");
|
||||
nancyConventions.StaticContentsConventions.AddDirectory($"{assetLocation}/docs", "swagger-ui");
|
||||
Debug.WriteLine($"AssetLocation {assetLocation}");
|
||||
|
||||
nancyConventions.StaticContentsConventions.AddDirectory($"{assetLocation}/fonts", "Content/fonts");
|
||||
nancyConventions.StaticContentsConventions.AddDirectory($"{assetLocation}Content", "Content");
|
||||
nancyConventions.StaticContentsConventions.AddDirectory($"{assetLocation}docs", "swagger-ui");
|
||||
nancyConventions.StaticContentsConventions.AddDirectory($"{assetLocation}fonts", "Content/fonts");
|
||||
}
|
||||
|
||||
protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" };
|
||||
|
@ -170,10 +171,9 @@ Debug.WriteLine("Added Content");
|
|||
notificationService.Subscribe(new SlackNotification(container.Get<ISlackApi>(), slackService));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected override void RequestStartup(IKernel container, IPipelines pipelines, NancyContext context)
|
||||
{
|
||||
Debug.WriteLine("RequestStartup");
|
||||
//CORS Enable
|
||||
pipelines.AfterRequest.AddItemToEndOfPipeline((ctx) =>
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ Debug.WriteLine("Added Content");
|
|||
|
||||
private void ConfigureContainer(IKernel container)
|
||||
{
|
||||
Debug.WriteLine("Configuring ServiceLoc/Container");
|
||||
Debug.WriteLine("Configuring ServiceLoc/Container");
|
||||
var loc = ServiceLocator.Instance;
|
||||
loc.SetContainer(container);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue