mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-27 20:41:54 +00:00
fixes #97 and creates a library dictionary cache to avoid FindById recursion
This commit is contained in:
@@ -127,6 +127,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
EndpointHostConfig.Instance.MetadataRedirectPath = "metadata";
|
||||
}
|
||||
|
||||
protected static readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||
|
||||
/// <summary>
|
||||
/// Configures the specified container.
|
||||
/// </summary>
|
||||
@@ -184,7 +186,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
|
||||
if (hasOptions.Options.TryGetValue("Content-Length", out contentLength) && !string.IsNullOrEmpty(contentLength))
|
||||
{
|
||||
var length = long.Parse(contentLength);
|
||||
var length = long.Parse(contentLength, UsCulture);
|
||||
|
||||
if (length > 0)
|
||||
{
|
||||
|
||||
@@ -139,11 +139,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
|
||||
if (!string.IsNullOrEmpty(vals[0]))
|
||||
{
|
||||
start = long.Parse(vals[0]);
|
||||
start = long.Parse(vals[0], UsCulture);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(vals[1]))
|
||||
{
|
||||
end = long.Parse(vals[1]);
|
||||
end = long.Parse(vals[1], UsCulture);
|
||||
}
|
||||
|
||||
_requestedRanges.Add(new KeyValuePair<long, long?>(start, end));
|
||||
|
||||
Reference in New Issue
Block a user