jc3213 / download_with_aria2

The browser extenson for aria2 download utility via JSON-RPC
GNU Lesser General Public License v2.1
60 stars 8 forks source link

Some downloads are not captured #56

Closed SelfishSailfish closed 1 year ago

SelfishSailfish commented 1 year ago

If I try to download a pdf file using "Save As" option in the dropdown, the built-in firefox is used instead of this aria2. Is this a bug or a feature?

jc3213 commented 1 year ago

If you are using Firefox, you can try to turn Capture Web Request on. That's because Firefox fires downloads.onCreated event after download has already started. Thus, I can't fix this problem on my side

If the file is very small or your network is fast enough. The download will be finished by the browser immediately before it can be cancelled and taken over by the extension.

The chromium browser fires downloads.onCreated when download is scheduled, then fires downloads.onDeterminingFileName before the Save as prompt is shown. So downloads from chromium browser can be completely captured by downloads API

I've implemented Capture Web Request because of Firefox's behavior, but that is still not perfect though. It will only process web requests those MIME type are application/*