mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-21 08:15:28 +03:00
Add resume capability to GetTempFile
This commit is contained in:
@@ -71,7 +71,14 @@ namespace MediaBrowser.Common.Implementations.Updates
|
||||
var target = Path.Combine(isArchive ? _appPaths.TempUpdatePath : _appPaths.PluginsPath, package.targetFilename);
|
||||
|
||||
// Download to temporary file so that, if interrupted, it won't destroy the existing installation
|
||||
var tempFile = await _httpClient.GetTempFile(package.sourceUrl, cancellationToken, progress).ConfigureAwait(false);
|
||||
var tempFile = await _httpClient.GetTempFile(new HttpRequestOptions
|
||||
{
|
||||
Url = package.sourceUrl,
|
||||
CancellationToken = cancellationToken,
|
||||
Progress = progress,
|
||||
MaxResumeCount = 3
|
||||
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user