|
|
@ -224,23 +224,22 @@ namespace MediaBrowser.ServerApplication
|
|
|
|
// Not crazy about this but it's the only way to suppress ffmpeg crash dialog boxes
|
|
|
|
// Not crazy about this but it's the only way to suppress ffmpeg crash dialog boxes
|
|
|
|
SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS | ErrorModes.SEM_NOALIGNMENTFAULTEXCEPT |
|
|
|
|
SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS | ErrorModes.SEM_NOALIGNMENTFAULTEXCEPT |
|
|
|
|
ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);
|
|
|
|
ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var task = _appHost.Init(initProgress);
|
|
|
|
SystemEvents.SessionEnding += SystemEvents_SessionEnding;
|
|
|
|
Task.WaitAll(task);
|
|
|
|
SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
|
|
|
|
|
|
|
|
|
|
|
|
task = _appHost.RunStartupTasks();
|
|
|
|
var task = _appHost.Init(initProgress);
|
|
|
|
Task.WaitAll(task);
|
|
|
|
task = task.ContinueWith(new Action<Task>(a => _appHost.RunStartupTasks()));
|
|
|
|
|
|
|
|
|
|
|
|
SystemEvents.SessionEnding += SystemEvents_SessionEnding;
|
|
|
|
|
|
|
|
SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (runService)
|
|
|
|
if (runService)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
StartService(logManager);
|
|
|
|
StartService(logManager);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
|
|
|
|
|
|
|
|
HideSplashScreen();
|
|
|
|
HideSplashScreen();
|
|
|
|
|
|
|
|
|
|
|
|
ShowTrayIcon();
|
|
|
|
ShowTrayIcon();
|
|
|
|