aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/MainStartup.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-11-11 15:37:53 -0500
committerGitHub <noreply@github.com>2016-11-11 15:37:53 -0500
commitb4c6cad2fa9256c4af83752a34679d2533c96b11 (patch)
tree43e25b4ed64a535823e21128ee74f3e0a1245069 /MediaBrowser.ServerApplication/MainStartup.cs
parent00316bc8ca9791f2ad68e84e29f2fbc6b1af2173 (diff)
parent2b19df9544315603673ff034e8fd621cf0b85a4b (diff)
Merge pull request #2281 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.ServerApplication/MainStartup.cs')
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs30
1 files changed, 25 insertions, 5 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs
index a3f4096367..09c948a4a8 100644
--- a/MediaBrowser.ServerApplication/MainStartup.cs
+++ b/MediaBrowser.ServerApplication/MainStartup.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Implementations;
using MediaBrowser.Server.Startup.Common;
-using MediaBrowser.Server.Startup.Common.Browser;
using MediaBrowser.ServerApplication.Native;
using MediaBrowser.ServerApplication.Splash;
using MediaBrowser.ServerApplication.Updates;
@@ -18,10 +17,17 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
+using Emby.Common.Implementations.EnvironmentInfo;
using Emby.Common.Implementations.IO;
using Emby.Common.Implementations.Logging;
+using Emby.Common.Implementations.Networking;
+using Emby.Common.Implementations.Security;
+using Emby.Server.Core;
+using Emby.Server.Core.Browser;
+using Emby.Server.Implementations.IO;
using ImageMagickSharp;
using MediaBrowser.Common.Net;
+using MediaBrowser.Server.Startup.Common.IO;
namespace MediaBrowser.ServerApplication
{
@@ -61,8 +67,8 @@ namespace MediaBrowser.ServerApplication
return false;
}
/// <summary>
- /// Defines the entry point of the application.
- /// </summary>
+ /// Defines the entry point of the application.
+ /// </summary>
public static void Main()
{
var options = new StartupOptions();
@@ -316,13 +322,22 @@ namespace MediaBrowser.ServerApplication
IsRunningAsService = runService
};
+ var imageEncoder = ImageEncoderHelper.GetImageEncoder(_logger, logManager, fileSystem, options, () => _appHost.HttpClient, appPaths);
+
_appHost = new ApplicationHost(appPaths,
logManager,
options,
fileSystem,
- nativeApp,
+ nativeApp,
new PowerManagement(),
- "emby.windows.zip");
+ "emby.windows.zip",
+ new EnvironmentInfo(),
+ imageEncoder,
+ new Server.Startup.Common.SystemEvents(logManager.GetLogger("SystemEvents")),
+ new RecyclableMemoryStreamProvider(),
+ new NetworkManager(logManager.GetLogger("NetworkManager")),
+ GenerateCertificate,
+ () => Environment.UserDomainName);
var initProgress = new Progress<double>();
@@ -363,6 +378,11 @@ namespace MediaBrowser.ServerApplication
}
}
+ private static void GenerateCertificate(string certPath, string certHost)
+ {
+ CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, _logger);
+ }
+
private static ServerNotifyIcon _serverNotifyIcon;
private static TaskScheduler _mainTaskScheduler;
private static void ShowTrayIcon()