|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
using NLog;
|
|
|
|
|
using NzbDrone.Common;
|
|
|
|
|
using NzbDrone.Common.Composition;
|
|
|
|
|
using NzbDrone.Common.EnvironmentInfo;
|
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Host
|
|
|
|
@ -10,18 +11,21 @@ namespace NzbDrone.Host
|
|
|
|
|
private readonly INzbDroneServiceFactory _nzbDroneServiceFactory;
|
|
|
|
|
private readonly IServiceProvider _serviceProvider;
|
|
|
|
|
private readonly IConsoleService _consoleService;
|
|
|
|
|
private readonly IRuntimeInfo _runtimeInfo;
|
|
|
|
|
private readonly IContainer _container;
|
|
|
|
|
private readonly Logger _logger;
|
|
|
|
|
|
|
|
|
|
public Router(INzbDroneServiceFactory nzbDroneServiceFactory,
|
|
|
|
|
IServiceProvider serviceProvider,
|
|
|
|
|
IConsoleService consoleService,
|
|
|
|
|
IRuntimeInfo runtimeInfo,
|
|
|
|
|
IContainer container,
|
|
|
|
|
Logger logger)
|
|
|
|
|
{
|
|
|
|
|
_nzbDroneServiceFactory = nzbDroneServiceFactory;
|
|
|
|
|
_serviceProvider = serviceProvider;
|
|
|
|
|
_consoleService = consoleService;
|
|
|
|
|
_runtimeInfo = runtimeInfo;
|
|
|
|
|
_container = container;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
@ -44,7 +48,7 @@ namespace NzbDrone.Host
|
|
|
|
|
|
|
|
|
|
case ApplicationModes.Interactive:
|
|
|
|
|
{
|
|
|
|
|
_logger.Debug("Console selected");
|
|
|
|
|
_logger.Debug(_runtimeInfo.IsWindowsTray ? "Tray selected" : "Console selected");
|
|
|
|
|
|
|
|
|
|
DbFactory.RegisterDatabase(_container);
|
|
|
|
|
_nzbDroneServiceFactory.Start();
|
|
|
|
|