aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication
diff options
context:
space:
mode:
authorMichael <michael@simplement-e.fr>2014-07-12 10:21:58 +0200
committerMichael <michael@simplement-e.fr>2014-07-12 10:21:58 +0200
commitb2550f6dd34bea58226aee4b1c4fa26104b5cda9 (patch)
treea145e99103ec4929bb7b33743fa8df5be9319ed2 /MediaBrowser.ServerApplication
parent83e50d1313a0d0ff6621981cad192072741fd970 (diff)
As session switch can't launch browser and sessionending does nothing in window service mode, moved the events handler to run only in interactive mode
Diffstat (limited to 'MediaBrowser.ServerApplication')
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs
index ffb6a9add..4c81716ed 100644
--- a/MediaBrowser.ServerApplication/MainStartup.cs
+++ b/MediaBrowser.ServerApplication/MainStartup.cs
@@ -226,8 +226,6 @@ namespace MediaBrowser.ServerApplication
ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);
}
- SystemEvents.SessionEnding += SystemEvents_SessionEnding;
- SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
var task = _appHost.Init(initProgress);
task = task.ContinueWith(new Action<Task>(a => _appHost.RunStartupTasks()));
@@ -239,7 +237,10 @@ namespace MediaBrowser.ServerApplication
else
{
Task.WaitAll(task);
-
+
+ SystemEvents.SessionEnding += SystemEvents_SessionEnding;
+ SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
+
HideSplashScreen();
ShowTrayIcon();