aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs20
1 files changed, 5 insertions, 15 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index bc637b02f..f6c08bba8 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -30,7 +30,6 @@ using Emby.Server.Implementations.Configuration;
using Emby.Server.Implementations.Cryptography;
using Emby.Server.Implementations.Data;
using Emby.Server.Implementations.Devices;
-using Emby.Server.Implementations.Diagnostics;
using Emby.Server.Implementations.Dto;
using Emby.Server.Implementations.HttpServer;
using Emby.Server.Implementations.HttpServer.Security;
@@ -85,7 +84,6 @@ using MediaBrowser.MediaEncoding.BdInfo;
using MediaBrowser.Model.Activity;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Cryptography;
-using MediaBrowser.Model.Diagnostics;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Globalization;
@@ -336,8 +334,6 @@ namespace Emby.Server.Implementations
internal IImageEncoder ImageEncoder { get; private set; }
- protected IProcessFactory ProcessFactory { get; private set; }
-
protected readonly IXmlSerializer XmlSerializer;
protected ISocketFactory SocketFactory { get; private set; }
@@ -685,9 +681,6 @@ namespace Emby.Server.Implementations
serviceCollection.AddSingleton(XmlSerializer);
- ProcessFactory = new ProcessFactory();
- serviceCollection.AddSingleton(ProcessFactory);
-
serviceCollection.AddSingleton(typeof(IStreamHelper), typeof(StreamHelper));
var cryptoProvider = new CryptographyProvider();
@@ -748,7 +741,6 @@ namespace Emby.Server.Implementations
LoggerFactory.CreateLogger<MediaBrowser.MediaEncoding.Encoder.MediaEncoder>(),
ServerConfigurationManager,
FileSystemManager,
- ProcessFactory,
LocalizationManager,
() => SubtitleEncoder,
startupConfig,
@@ -868,8 +860,7 @@ namespace Emby.Server.Implementations
FileSystemManager,
MediaEncoder,
HttpClient,
- MediaSourceManager,
- ProcessFactory);
+ MediaSourceManager);
serviceCollection.AddSingleton(SubtitleEncoder);
serviceCollection.AddSingleton(typeof(IResourceFileManager), typeof(ResourceFileManager));
@@ -1727,15 +1718,14 @@ namespace Emby.Server.Implementations
throw new NotSupportedException();
}
- var process = ProcessFactory.Create(new ProcessStartInfo
+ var processStartInfo = new ProcessStartInfo
{
FileName = url,
UseShellExecute = true,
ErrorDialog = false
- });
-
- process.EnableRaisingEvents = true;
- process.Exited += (sender, args) => ((Process)sender).Dispose(); ;
+ };
+ var process = new Process { StartInfo = processStartInfo, EnableRaisingEvents = true };
+ process.Exited += (sender, args) => ((Process)sender).Dispose();
try
{