diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-03 15:07:48 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-03 15:07:48 -0400 |
| commit | 8fd3bf42173e02f3b05c0373072c97e19fb76b9a (patch) | |
| tree | 0bbdb2ba3bbceca88955ceb012c7a07713b95102 /Emby.Common.Implementations | |
| parent | a2dd144d5ccc8a5092f49983df8a030f7df4f82b (diff) | |
change pcl's to .netstandard
Diffstat (limited to 'Emby.Common.Implementations')
| -rw-r--r-- | Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs | 20 | ||||
| -rw-r--r-- | Emby.Common.Implementations/project.json | 28 |
2 files changed, 30 insertions, 18 deletions
diff --git a/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs index 4c034fa6aa..85fcb556f0 100644 --- a/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -169,9 +169,23 @@ namespace Emby.Common.Implementations.HttpClientManager AddRequestHeaders(httpWebRequest, options); #if NET46 - httpWebRequest.AutomaticDecompression = options.EnableHttpCompression ? - (options.DecompressionMethod ?? DecompressionMethods.Deflate) : - DecompressionMethods.None; + if (options.EnableHttpCompression) + { + if (options.DecompressionMethod.HasValue) + { + httpWebRequest.AutomaticDecompression = options.DecompressionMethod.Value == CompressionMethod.Gzip + ? DecompressionMethods.GZip + : DecompressionMethods.Deflate; + } + else + { + httpWebRequest.AutomaticDecompression = DecompressionMethods.Deflate; + } + } + else + { + httpWebRequest.AutomaticDecompression = DecompressionMethods.None; + } #endif } diff --git a/Emby.Common.Implementations/project.json b/Emby.Common.Implementations/project.json index a65b863458..dc96f5726c 100644 --- a/Emby.Common.Implementations/project.json +++ b/Emby.Common.Implementations/project.json @@ -23,27 +23,20 @@ "System.Xml.Serialization": "4.0.0.0" }, "dependencies": { - "MediaBrowser.Common": { - "target": "project" - }, + "SimpleInjector": "3.2.4", + "NLog": "4.4.0-betaV15", "MediaBrowser.Model": { "target": "project" }, - "SimpleInjector": "3.2.4", - "NLog": "4.4.0-betaV15" - } + "MediaBrowser.Common": { + "target": "project" + } } }, "netstandard1.6": { "imports": "dnxcore50", "dependencies": { "NETStandard.Library": "1.6.0", - "MediaBrowser.Common": { - "target": "project" - }, - "MediaBrowser.Model": { - "target": "project" - }, - "System.IO.FileSystem.DriveInfo": "4.0.0", + "System.IO.FileSystem.DriveInfo": "4.0.0", "System.Diagnostics.Process": "4.1.0", "System.Threading.Timer": "4.0.1", "System.Net.Requests": "4.0.11", @@ -58,8 +51,13 @@ "System.Reflection.Primitives": "4.0.1", "System.Runtime.Loader": "4.0.0", "SimpleInjector": "3.2.4", - "NLog": "4.4.0-betaV15" - } + "NLog": "4.4.0-betaV15", + "MediaBrowser.Model": { + "target": "project" + }, + "MediaBrowser.Common": { + "target": "project" + } } } } } |
