diff --git a/.gitignore b/.gitignore index 177a9eeed..67e398b33 100644 --- a/.gitignore +++ b/.gitignore @@ -150,3 +150,6 @@ Thumbs.db # AppVeyor /tools-cake/ /_artifacts/ + +# Cake +/tools/Addins/* \ No newline at end of file diff --git a/src/NzbDrone.Api/NancyBootstrapper.cs b/src/NzbDrone.Api/NancyBootstrapper.cs index 695967025..78ac15d6e 100644 --- a/src/NzbDrone.Api/NancyBootstrapper.cs +++ b/src/NzbDrone.Api/NancyBootstrapper.cs @@ -34,7 +34,6 @@ namespace NzbDrone.Api RegisterPipelines(pipelines); container.Resolve().Register(); - container.Resolve().PublishEvent(new ApplicationStartedEvent()); } private void RegisterPipelines(IPipelines pipelines) @@ -56,4 +55,4 @@ namespace NzbDrone.Api protected override byte[] FavIcon => null; } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Host/ApplicationServer.cs b/src/NzbDrone.Host/ApplicationServer.cs index e7235683b..5491101bc 100644 --- a/src/NzbDrone.Host/ApplicationServer.cs +++ b/src/NzbDrone.Host/ApplicationServer.cs @@ -1,6 +1,7 @@ -using System; +using System; using System.ServiceProcess; using NLog; +using NzbDrone.Common.Composition; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.Configuration; using NzbDrone.Core.Lifecycle; @@ -22,6 +23,7 @@ namespace Radarr.Host private readonly IHostController _hostController; private readonly IStartupContext _startupContext; private readonly IBrowserService _browserService; + private readonly IContainer _container; private readonly Logger _logger; public NzbDroneServiceFactory(IConfigFileProvider configFileProvider, @@ -29,6 +31,7 @@ namespace Radarr.Host IRuntimeInfo runtimeInfo, IStartupContext startupContext, IBrowserService browserService, + IContainer container, Logger logger) { _configFileProvider = configFileProvider; @@ -36,6 +39,7 @@ namespace Radarr.Host _runtimeInfo = runtimeInfo; _startupContext = startupContext; _browserService = browserService; + _container = container; _logger = logger; } @@ -59,6 +63,8 @@ namespace Radarr.Host { _browserService.LaunchWebUI(); } + + _container.Resolve().PublishEvent(new ApplicationStartedEvent()); } protected override void OnStop() @@ -93,4 +99,4 @@ namespace Radarr.Host } } } -} \ No newline at end of file +}