Skip to content

Commit ef5ed51

Browse files
author
Meyn
committed
Fix negative BytesDownloaded
1 parent 7ab8247 commit ef5ed51

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

DownloadAssistant/DownloadAssistant.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageProjectUrl></PackageProjectUrl>
1111
<PackageIcon>logo.png</PackageIcon>
1212
<PackageReadmeFile>README.md</PackageReadmeFile>
13-
<Version>1.1.1</Version>
13+
<Version>1.1.2</Version>
1414
<GenerateDocumentationFile>True</GenerateDocumentationFile>
1515
<Description>
1616
A free to use library as a download manager.
@@ -57,11 +57,11 @@
5757
</ItemGroup>
5858

5959
<ItemGroup>
60-
<Compile Update="Media\MimeTypes.Designer.cs">
61-
<DesignTime>True</DesignTime>
62-
<AutoGen>True</AutoGen>
63-
<DependentUpon>MimeTypes.resx</DependentUpon>
64-
</Compile>
60+
<Compile Update="Media\MimeTypes.Designer.cs">
61+
<DesignTime>True</DesignTime>
62+
<AutoGen>True</AutoGen>
63+
<DependentUpon>MimeTypes.resx</DependentUpon>
64+
</Compile>
6565
</ItemGroup>
6666

6767
<ItemGroup>

DownloadAssistant/Utilities/ChunkHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class ChunkHandler
2323
/// <summary>
2424
/// The total number of bytes that have been written to all chunk files.
2525
/// </summary>
26-
public long BytesDownloaded => Requests.Sum(x => x.BytesWritten);
26+
public long BytesDownloaded => Requests.Where(x => x.BytesWritten >= 0).Sum(x => x.BytesWritten);
2727

2828
/// <summary>
2929
/// Gets all the requests that are in the <see cref="RequestContainer"/>.

0 commit comments

Comments
 (0)