diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-28 14:35:17 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-28 14:35:17 -0400 |
| commit | 89ff1f2af65283158e5ebe69bcc3d652b887ea34 (patch) | |
| tree | adfc3677063580b72ccf172f26a3378d91944574 /MediaBrowser.Server.Startup.Common/ApplicationHost.cs | |
| parent | f6acc5fbff081728138564867a58b7848c92c467 (diff) | |
update components
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 20 |
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); |
