aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/App.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.ServerApplication/App.xaml.cs')
-rw-r--r--MediaBrowser.ServerApplication/App.xaml.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/MediaBrowser.ServerApplication/App.xaml.cs b/MediaBrowser.ServerApplication/App.xaml.cs
index 762eb4cd2..5a1d7505c 100644
--- a/MediaBrowser.ServerApplication/App.xaml.cs
+++ b/MediaBrowser.ServerApplication/App.xaml.cs
@@ -6,6 +6,7 @@ using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Implementations;
+using MediaBrowser.ServerApplication.Splash;
using Microsoft.Win32;
using System;
using System.Diagnostics;
@@ -164,11 +165,19 @@ namespace MediaBrowser.ServerApplication
Logger = CompositionRoot.LogManager.GetLogger("App");
+ var splash = new SplashWindow(CompositionRoot.ApplicationVersion);
+
+ splash.Show();
+
await CompositionRoot.Init();
- var win = new MainWindow(CompositionRoot.LogManager, CompositionRoot, CompositionRoot.ServerConfigurationManager, CompositionRoot.UserManager, CompositionRoot.LibraryManager, CompositionRoot.JsonSerializer, CompositionRoot.DisplayPreferencesManager);
+ splash.Hide();
+
+ var task = CompositionRoot.RunStartupTasks();
+
+ new MainWindow(CompositionRoot.LogManager, CompositionRoot, CompositionRoot.ServerConfigurationManager, CompositionRoot.UserManager, CompositionRoot.LibraryManager, CompositionRoot.JsonSerializer, CompositionRoot.DisplayPreferencesManager).Show();
- win.Show();
+ await task.ConfigureAwait(false);
}
catch (Exception ex)
{