aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/MainStartup.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-12 14:09:42 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-12 14:09:42 -0400
commit2e3d1780e48c75ac90fc92d17648b2db6c70e94c (patch)
tree558b953b1e01a16bd47d902c841cc747a50e0ae7 /MediaBrowser.ServerApplication/MainStartup.cs
parent911de889b1e941c29ee0d7ff68d728fc009b745f (diff)
update dlna profiles
Diffstat (limited to 'MediaBrowser.ServerApplication/MainStartup.cs')
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs24
1 files changed, 15 insertions, 9 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs
index a4bbd65d0..272054609 100644
--- a/MediaBrowser.ServerApplication/MainStartup.cs
+++ b/MediaBrowser.ServerApplication/MainStartup.cs
@@ -22,6 +22,7 @@ using Emby.Common.Implementations.IO;
using Emby.Common.Implementations.Logging;
using Emby.Common.Implementations.Networking;
using Emby.Common.Implementations.Security;
+using Emby.Drawing;
using Emby.Server.Core;
using Emby.Server.Core.Logging;
using Emby.Server.Implementations;
@@ -335,8 +336,6 @@ namespace MediaBrowser.ServerApplication
var fileSystem = new ManagedFileSystem(logManager.GetLogger("FileSystem"), environmentInfo, appPaths.TempDirectory);
- var imageEncoder = ImageEncoderHelper.GetImageEncoder(_logger, logManager, fileSystem, options, () => _appHost.HttpClient, appPaths);
-
FileSystem = fileSystem;
_appHost = new WindowsAppHost(appPaths,
@@ -346,7 +345,7 @@ namespace MediaBrowser.ServerApplication
new PowerManagement(),
"emby.windows.zip",
environmentInfo,
- imageEncoder,
+ new NullImageEncoder(),
new Server.Startup.Common.SystemEvents(logManager.GetLogger("SystemEvents")),
new RecyclableMemoryStreamProvider(),
new Networking.NetworkManager(logManager.GetLogger("NetworkManager")),
@@ -367,6 +366,19 @@ namespace MediaBrowser.ServerApplication
var task = _appHost.Init(initProgress);
Task.WaitAll(task);
+ if (!runService)
+ {
+ task = InstallVcredist2013IfNeeded(_appHost, _logger);
+ Task.WaitAll(task);
+
+ // needed by skia
+ task = InstallVcredist2015IfNeeded(_appHost, _logger);
+ Task.WaitAll(task);
+ }
+
+ // set image encoder here
+ _appHost.ImageProcessor.ImageEncoder = ImageEncoderHelper.GetImageEncoder(_logger, logManager, fileSystem, options, () => _appHost.HttpClient, appPaths);
+
task = task.ContinueWith(new Action<Task>(a => _appHost.RunStartupTasks()), TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.AttachedToParent);
if (runService)
@@ -377,12 +389,6 @@ namespace MediaBrowser.ServerApplication
{
Task.WaitAll(task);
- task = InstallVcredist2013IfNeeded(_appHost, _logger);
- Task.WaitAll(task);
-
- task = InstallVcredist2015IfNeeded(_appHost, _logger);
- Task.WaitAll(task);
-
Microsoft.Win32.SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
HideSplashScreen();