jc3213 / download_with_aria2

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

Button to open FileManager #5

Closed SGiuseppe closed 2 years ago

SGiuseppe commented 2 years ago

Premise, I like the project but it would be useful a button that opens me on the filemanager the downloaded file location

jc3213 commented 2 years ago

There's no API I can find to open the download folder. If there's any available API, I've added this function long time ago.

If you can provide any other extension that do have this function, it will be appreciated

g-eipi10 commented 2 years ago

I think extensions are not allowed to open local folders. In that case, it would be nice to have a copy button so user can copy the folder path and open it via another shortcut key software like Autohotkey, or can just simply paste that folder path to the file explorer to open it quickly.

SGiuseppe commented 2 years ago

I installed DownThemall and Download Manager (S3) using the right button on the downloaded files there are two "Open File" and "Open Folder" entries. I don't know if as an example it can be useful

jc3213 commented 2 years ago

I've looked into Download Manager (S3)'s source code, and also tried it.

It's a manager that manages browser's download, not a third-party download program's web interface. It uses chrome.downloads.show(downloadId) to open the folder. This restricts that all manage actions must use native downloads API.

Downloads captured by this extension are removed from history. Event if not, you get download id but only open the folder browser has once tried to save it. The downloads are handled by aria2, and saved into aria2's download folder,

New downloads created by extension - contextMenu or newTaskWindow - have no download ids. downloads.show can not open the folder

Technically, I can't do the same job downloads show usage

g-eipi10 commented 2 years ago

Yeah, I also checked the code of Download Manager (S3) yesterday, and usually those extensions utilize browser's built-in download to open downloaded file via the ID. If the built-in download is canceled (to use aria2), it can't open that folder.