aria2p icon indicating copy to clipboard operation
aria2p copied to clipboard

Open a file right from aria2p

Open Bellavene opened this issue 3 years ago • 5 comments

Would be useful a lot to open a file with a keystroke and even perfect to make shell custom commands binded to a key.

Bellavene avatar Feb 21 '22 21:02 Bellavene

Could you expand a bit? What file? What shell commands?

pawamoy avatar Feb 22 '22 11:02 pawamoy

Excuse me, wasn’t clear. Open any downloaded file right from top interface, wouldn’t it be nice to open a video without the need to open the folder elsewhere? And bind keys for custom shell commands, so we can for example move files to predefined directories with simple shell commands and etc. etc. etc.

I have binded a key for aria2p terminal window, a bit annoying that you can’t even go to downloads folder from it like from any downloads manager, but you could.

Bellavene avatar Feb 22 '22 18:02 Bellavene

Unfortunately there's absolutely no way to do that from aria2p. We're communicating with the server using the HTTP (JSON-RPC) protocol, so we simply cannot issue shell commands onto the server where the aria2c daemon is running. Of course we could issue commands on the current machine, where aria2p is running, but that would only work when the daemon is also running locally and not on a remote server. If you have suggestions on how to make this work for remote servers as well, please share! In the meantime I'll close this issue.

EDIT: we could argue that aria2p already provides functions that only work locally, so why not add more. Well, indeed, why not. We just need to design a good architecture to handle the situation where the daemon is on a remote server (to replace local ops with no ops and warnings).

pawamoy avatar Apr 17 '22 19:04 pawamoy

I meant the aria2p top interface, would be absolutely awesome if we could add a keystroke to open the file or its location in ranger or other file manager via a command.

Bellavene avatar Sep 12 '23 20:09 Bellavene

Textual can be used now to re-implement the TUI with it. Happy to review PRs, otherwise I'll get to it when I need to have some fun :slightly_smiling_face:

pawamoy avatar Sep 13 '23 10:09 pawamoy