diff options
Diffstat (limited to 'MediaBrowser.ServerApplication/MainStartup.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/MainStartup.cs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index e687b34cf..6635cddb7 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Logging; -using MediaBrowser.Server.Implementations; using MediaBrowser.Server.Startup.Common; using MediaBrowser.ServerApplication.Native; using MediaBrowser.ServerApplication.Splash; @@ -17,15 +16,12 @@ 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.Server.Core.Cryptography; using Emby.Drawing; using Emby.Server.Core; using Emby.Server.Implementations; using Emby.Server.Implementations.Browser; +using Emby.Server.Implementations.EnvironmentInfo; using Emby.Server.Implementations.IO; using Emby.Server.Implementations.Logging; using MediaBrowser.Common.Net; @@ -76,7 +72,7 @@ namespace MediaBrowser.ServerApplication var appPaths = CreateApplicationPaths(ApplicationPath, IsRunningAsService); - var logManager = new NlogManager(appPaths.LogDirectoryPath, "server"); + var logManager = new SimpleLogManager(appPaths.LogDirectoryPath, "server"); logManager.ReloadLogger(LogSeverity.Debug); logManager.AddConsoleOutput(); @@ -240,18 +236,16 @@ namespace MediaBrowser.ServerApplication var resourcesPath = Path.GetDirectoryName(applicationPath); - Action<string> createDirectoryFn = s => Directory.CreateDirectory(s); - if (runAsService) { var systemPath = Path.GetDirectoryName(applicationPath); var programDataPath = Path.GetDirectoryName(systemPath); - return new ServerApplicationPaths(programDataPath, appFolderPath, resourcesPath, createDirectoryFn); + return new ServerApplicationPaths(programDataPath, appFolderPath, resourcesPath); } - return new ServerApplicationPaths(ApplicationPathHelper.GetProgramDataPath(applicationPath), appFolderPath, resourcesPath, createDirectoryFn); + return new ServerApplicationPaths(ApplicationPathHelper.GetProgramDataPath(applicationPath), appFolderPath, resourcesPath); } /// <summary> @@ -320,10 +314,7 @@ namespace MediaBrowser.ServerApplication environmentInfo, new NullImageEncoder(), new SystemEvents(logManager.GetLogger("SystemEvents")), - new MemoryStreamProvider(), - new Networking.NetworkManager(logManager.GetLogger("NetworkManager")), - GenerateCertificate, - () => Environment.UserDomainName); + new Networking.NetworkManager(logManager.GetLogger("NetworkManager"))); var initProgress = new Progress<double>(); @@ -370,11 +361,6 @@ namespace MediaBrowser.ServerApplication } } - private static void GenerateCertificate(string certPath, string certHost, string certPassword) - { - CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, certPassword, _logger); - } - private static ServerNotifyIcon _serverNotifyIcon; private static TaskScheduler _mainTaskScheduler; private static void ShowTrayIcon() |
