|
|
|
@ -226,21 +226,20 @@ namespace MediaBrowser.ServerApplication
|
|
|
|
|
ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var task = _appHost.Init(initProgress);
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
|
|
|
|
|
task = _appHost.RunStartupTasks();
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
|
|
|
|
|
SystemEvents.SessionEnding += SystemEvents_SessionEnding;
|
|
|
|
|
SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
|
|
|
|
|
|
|
|
|
|
var task = _appHost.Init(initProgress);
|
|
|
|
|
task = task.ContinueWith(new Action<Task>(a => _appHost.RunStartupTasks()));
|
|
|
|
|
|
|
|
|
|
if (runService)
|
|
|
|
|
{
|
|
|
|
|
StartService(logManager);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
|
|
|
|
|
HideSplashScreen();
|
|
|
|
|
|
|
|
|
|
ShowTrayIcon();
|
|
|
|
|