mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-15 14:52:20 +01:00
remove dead throttle code
This commit is contained in:
@@ -461,10 +461,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
{
|
||||
return new RangeRequestWriter(rangeHeader, stream, contentType, isHeadRequest)
|
||||
{
|
||||
Throttle = options.Throttle,
|
||||
ThrottleLimit = options.ThrottleLimit,
|
||||
MinThrottlePosition = options.MinThrottlePosition,
|
||||
ThrottleCallback = options.ThrottleCallback,
|
||||
OnComplete = options.OnComplete
|
||||
};
|
||||
}
|
||||
@@ -480,10 +476,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
|
||||
return new StreamWriter(stream, contentType, _logger)
|
||||
{
|
||||
Throttle = options.Throttle,
|
||||
ThrottleLimit = options.ThrottleLimit,
|
||||
MinThrottlePosition = options.MinThrottlePosition,
|
||||
ThrottleCallback = options.ThrottleCallback,
|
||||
OnComplete = options.OnComplete
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,10 +24,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
private long RangeLength { get; set; }
|
||||
private long TotalContentLength { get; set; }
|
||||
|
||||
public bool Throttle { get; set; }
|
||||
public long ThrottleLimit { get; set; }
|
||||
public long MinThrottlePosition;
|
||||
public Func<long, long, long> ThrottleCallback { get; set; }
|
||||
public Action OnComplete { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -165,14 +161,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
/// <param name="responseStream">The response stream.</param>
|
||||
public void WriteTo(Stream responseStream)
|
||||
{
|
||||
if (Throttle)
|
||||
{
|
||||
responseStream = new ThrottledStream(responseStream, ThrottleLimit)
|
||||
{
|
||||
MinThrottlePosition = MinThrottlePosition,
|
||||
ThrottleCallback = ThrottleCallback
|
||||
};
|
||||
}
|
||||
WriteToInternal(responseStream);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
get { return _options; }
|
||||
}
|
||||
|
||||
public bool Throttle { get; set; }
|
||||
public long ThrottleLimit { get; set; }
|
||||
public long MinThrottlePosition;
|
||||
public Func<long, long, long> ThrottleCallback { get; set; }
|
||||
public Action OnComplete { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -82,14 +78,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
/// <param name="responseStream">The response stream.</param>
|
||||
public void WriteTo(Stream responseStream)
|
||||
{
|
||||
if (Throttle)
|
||||
{
|
||||
responseStream = new ThrottledStream(responseStream, ThrottleLimit)
|
||||
{
|
||||
MinThrottlePosition = MinThrottlePosition,
|
||||
ThrottleCallback = ThrottleCallback
|
||||
};
|
||||
}
|
||||
WriteToInternal(responseStream);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user