Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry download not continue download #114

Closed
Monirzadeh opened this issue Jun 30, 2022 · 4 comments
Closed

Retry download not continue download #114

Monirzadeh opened this issue Jun 30, 2022 · 4 comments
Labels
unconfirmed This bug was not reproduced yet

Comments

@Monirzadeh
Copy link

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:

  1. add a link to aria2p
  2. wait for some progress.
  3. disconnect from internet or wait for a failed error.
  4. connect internet
  5. press R or r to retry download
  6. 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

@Monirzadeh Monirzadeh added the unconfirmed This bug was not reproduced yet label Jun 30, 2022
@pawamoy
Copy link
Owner

pawamoy commented Aug 17, 2022

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.

@Monirzadeh
Copy link
Author

Do you want any specific test on my side?

@Links662
Copy link

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)

@pawamoy
Copy link
Owner

pawamoy commented Dec 15, 2022

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!

pawamoy added a commit that referenced this issue Dec 15, 2022
@pawamoy pawamoy closed this as completed Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed This bug was not reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants