diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-03-31 13:39:28 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-03-31 13:39:28 -0400 |
| commit | 9f06eb781f5992496a7b1a59fb55b0aa6520261f (patch) | |
| tree | 0ed3bb79646b6495eaa16214a71f87ac18fdf435 /MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs | |
| parent | b7c3bc592f4525428df1ac86d57ffb340a001dc6 (diff) | |
fixes #97 and creates a library dictionary cache to avoid FindById recursion
Diffstat (limited to 'MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs index 0e9696648..8508fcdf5 100644 --- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -1,4 +1,5 @@ -using System.Net.Http.Headers; +using System.Globalization; +using System.Net.Http.Headers; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.IO; using MediaBrowser.Common.Net; @@ -216,6 +217,8 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager return GetTempFile(options, tempFile, 0); } + protected static readonly CultureInfo UsCulture = new CultureInfo("en-US"); + /// <summary> /// Gets the temp file. /// </summary> @@ -278,7 +281,7 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager } else { - var length = long.Parse(string.Join(string.Empty, lengthValues.ToArray())); + var length = long.Parse(string.Join(string.Empty, lengthValues.ToArray()), UsCulture); using (var stream = ProgressStream.CreateReadProgressStream(await response.Content.ReadAsStreamAsync().ConfigureAwait(false), options.Progress.Report, length)) { |
