Skip to content

Commit

Permalink
RangeDownload改为ResponseHeadersRead,防止大量预下载
Browse files Browse the repository at this point in the history
  • Loading branch information
j4587698 committed May 17, 2024
1 parent 8a42c5c commit cd4b976
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AListSdkSharp/AListSdkSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description>AList .Net Sdk</Description>
<PackageProjectUrl>https://github.com/j4587698/AListSdkSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/j4587698/AListSdkSharp</RepositoryUrl>
<Version>1.1.1</Version>
<Version>1.1.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion AListSdkSharp/Api/Fs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public async Task<Stream> RangeDownload(string rawUrl, long position, long count

var response = await rawUrl
.WithHeader("Range", $"bytes={position}-{position + count - 1}")
.GetAsync(cancellationToken: cancellationToken);
.GetAsync(HttpCompletionOption.ResponseHeadersRead, cancellationToken: cancellationToken);

if (response.StatusCode != 206)
{
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
AListSdkSharp 是C#的AList SDK访问层,用于访问AList的API。
使用flurl作为http请求库。

version 1.1.2:

RangeDownload改为ResponseHeadersRead,防止大量预下载

version 1.1:

本次更新较大,删除了以前的用法,更新为新用法,现在使用更加简单。
Expand Down

0 comments on commit cd4b976

Please sign in to comment.