Closed ghost closed 5 years ago
Merging #40 into master will decrease coverage by
6.46%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #40 +/- ##
=======================================
- Coverage 80.46% 74% -6.47%
=======================================
Files 5 5
Lines 650 650
=======================================
- Hits 523 481 -42
- Misses 127 169 +42
Impacted Files | Coverage Δ | |
---|---|---|
pySmartDL/pySmartDL.py | 71.97% <100%> (-5.5%) |
:arrow_down: |
pySmartDL/utils.py | 77.95% <0%> (-12.6%) |
:arrow_down: |
pySmartDL/download.py | 71.21% <0%> (-9.1%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 4e71c18...de9aa25. Read the comment docs.
Nice catch. Let me inspect it and I'll merge it soon.
So, few notes:
The rounding issue is from the python2 ages. Thanks for that. I believe this will fix the bug.
I wonder regarding the fix of the filesize-1
.
Since this issue seems to be an off-by-one issue, it might be the solution. However I'm quite baffled:
since the bytes count goes from 0
to filesize-1
(inclusive), we cannot request byte filesize
.
For example, if we're downloading a 5 bytes file, we would request bytes 0 to 4. Requesting byte would be an error.
What do you think?
Yes you are totally right, the filesize-1
to filesize
won't fix anything !
I will push a correction :)
Done
And I also round the filesize/threads in the while (threads number verification) like you said before editing your post, I think it is indeed better to check with the same chunck size we will have after
This should do the job to solve issue #35
Tested with file sizes / threads from #35 , and with more than 10000 size/thread configuration.