aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/ApplicationHost.cs')
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationHost.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
index 9011f0bf5..b6e7bb5e9 100644
--- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
+++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
@@ -117,6 +117,7 @@ using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Services;
using MediaBrowser.Model.Social;
using MediaBrowser.Model.Xml;
+using MediaBrowser.Server.Implementations.Archiving;
using MediaBrowser.Server.Implementations.Reflection;
using MediaBrowser.Server.Implementations.Xml;
using OpenSubtitlesHandler;
@@ -222,6 +223,12 @@ namespace MediaBrowser.Server.Startup.Common
private IMediaSourceManager MediaSourceManager { get; set; }
private IPlaylistManager PlaylistManager { get; set; }
+ /// <summary>
+ /// Gets or sets the zip client.
+ /// </summary>
+ /// <value>The zip client.</value>
+ protected IZipClient ZipClient { get; private set; }
+
private readonly StartupOptions _startupOptions;
private readonly string _releaseAssetFilename;
@@ -380,6 +387,16 @@ namespace MediaBrowser.Server.Startup.Common
LogManager.RemoveConsoleOutput();
}
+ protected override IMemoryStreamProvider CreateMemoryStreamProvider()
+ {
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ {
+ return new RecyclableMemoryStreamProvider();
+ }
+
+ return new MemoryStreamProvider();
+ }
+
protected override IJsonSerializer CreateJsonSerializer()
{
var result = base.CreateJsonSerializer();
@@ -625,6 +642,9 @@ namespace MediaBrowser.Server.Startup.Common
{
await base.RegisterResources(progress).ConfigureAwait(false);
+ ZipClient = new ZipClient(FileSystemManager);
+ RegisterSingleInstance(ZipClient);
+
RegisterSingleInstance<IHttpResultFactory>(new HttpResultFactory(LogManager, FileSystemManager, JsonSerializer));
RegisterSingleInstance<IServerApplicationHost>(this);