aria2p
aria2p copied to clipboard
Retry download not continue download
Describe the bug
if you download a link (has some progress for example 50%) than get error or failed retry them with r
or R
than aria2p save them as 100% and complete instead of continue download them
To Reproduce
Steps to reproduce the behavior:
- add a link to aria2p
- wait for some progress.
- disconnect from internet or wait for a failed error.
- connect internet
- press
R
orr
to retry download - as you see set that error downoad change to complete instead of active to continue downloading
Expected behavior
if a file get failed or error, retry
continue downloading instead of save them as complete.
System (please complete the following information):
-
aria2p
version: [0.11.2] - Python version: [3.10.5]
- OS: [Linux]
Additional context if I restart that download with other client for example motrix than it is correctly continue download
Hello, thanks for the report. I will try to replicate but I suspect I won't be able to fix it if it comes from aria2 itself.
Do you want any specific test on my side?
It may be a bug in file api.py line 421.
self.remove([download], clean)
the function "remove" is in line 426
def remove( # noqa: WPS231 (complex, maybe we could split it)
self,
downloads: List[Download],
force: bool = False,
files: bool = False,
clean: bool = True,
) -> List[OperationResult]:
the parameter of "clean" in line 421 is the parameter "force" in line 426. It will make clean=True in line 421 and delete the .aria2 files accidently. Then, when you retry the download, it will be complete at once instead of continue downloading them. The right line 421 may like this
self.remove([download], clean=clean)
Wow, good catch @Links662! That's an argument in favor of keyword-only parameters! Let me fix that right now. And thank you for your patience!