mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-09-01 01:12:58 +00:00
restore nuget targets for mono build
This commit is contained in:
parent
a3d553a7fb
commit
60d1d5cdee
27 changed files with 396 additions and 251 deletions
|
|
@ -39,6 +39,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
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>
|
||||
/// Initializes a new instance of the <see cref="StreamWriter" /> class.
|
||||
|
|
@ -85,7 +87,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
{
|
||||
responseStream = new ThrottledStream(responseStream, ThrottleLimit)
|
||||
{
|
||||
MinThrottlePosition = MinThrottlePosition
|
||||
MinThrottlePosition = MinThrottlePosition,
|
||||
ThrottleCallback = ThrottleCallback
|
||||
};
|
||||
}
|
||||
var task = WriteToAsync(responseStream);
|
||||
|
|
@ -113,6 +116,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (OnComplete != null)
|
||||
{
|
||||
OnComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue