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

When Metalink item fails and gets retried, "name" attribute is ignored #750

Open
maliayas opened this issue Apr 5, 2024 · 4 comments
Open

Comments

@maliayas
Copy link

maliayas commented Apr 5, 2024

I'm using AriaNg Native and I don't know if this issue belongs to AriaNg, AriaNg Native or aria2.

If an item in a Metalink file fails, the GUI provides a button to retry it. However using that button causes the download destination to be completely ignored.

Sample Metalink:

<?xml version="1.0" encoding="UTF-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" xmlns:a0="http://www.downthemall.net/properties#" >
    <files>
        <file name="lorem/ipsum.zip" >
            <resources>
                <url type="http" >https://download.gimp.org/pub/gimp/v2.10/windows/gimp-2.10.36-setup.exe</url>
            </resources>
        </file>
    </files>
</metalink>

If the download succeeds at first try, then the file successfully get saved as "lorem/ipsum.zip" (mind the subfolder). However if it fails and then I "retry", <file name="lorem/ipsum.zip" > becomes completely ignored as if I manually added a new URL.

@mayswind
Copy link
Owner

mayswind commented Apr 5, 2024

When you retry a task, AriaNg would submit the download url and all original task options (including the file name set by user) to aria2. So it is very useful when retrying the task which downloads http url.
But the metalink file can also contain a custom filename, which aria2 neither put it as a task option nor can AriaNg get it through the RPC interface. Although AriaNg can get the full absolute file path of old task, if AriaNg submits this path to aria2, aria2 may consider the file already exists and cause a new failure.
Therefore, the current solution is a compromise for retry metalink task.

@maliayas
Copy link
Author

So "retrying" feature for Metalink is not a first class citizen in aria2. Maybe we can 1. get old task's info 2. delete old task 3. submit new task with the same info?

@maliayas
Copy link
Author

Or should I open an issue in aria2 repo?

If you think there is no robust solution to this usecase, you can close the issue.

@mayswind
Copy link
Owner

So "retrying" feature for Metalink is not a first class citizen in aria2. Maybe we can 1. get old task's info 2. delete old task 3. submit new task with the same info?

aria2 itself does not support "retrying task". The "retrying task" feature of AriaNg is based on the existing api of aria2. I think you can ask aria2 why the download path specified in the metalink file is not set to the task options of aria2, but I think aria2 may not make the adjustment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants