monsterutilities icon indicating copy to clipboard operation
monsterutilities copied to clipboard

[Feature Request] Add aria2 support

Open Naville opened this issue 5 years ago • 9 comments

Aria2 is an established download manager that provides an easy-to-use RPC interface, just craft the JSON and post it. Done :)
It provides all the features you would expect from a downloader as well,

Naville avatar Mar 26 '19 16:03 Naville

Isn't Aria2 used in uget ? If so, that would be awesome because uget is a very cool software !

Le mar. 26 mars 2019 à 17:31, Zhang [email protected] a écrit :

Aria2 is an established download manager that provides an easy-to-use RPC interface, just craft the JSON and post it. Done :) It provides all the features you would expect from a downloader as well,

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Xerus2000/monsterutilities/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/ASW6QEUSOr8-D3kUCJgLr_gvvFiR0XGMks5vaktpgaJpZM4cL52u .

--

Merci, Daniel Thirion (defvs) [email protected]

defvs avatar Mar 26 '19 21:03 defvs

How/Where do I post it, and what is the JSON structure? If you want me to implement it, I'd like to not spend much time researching but get right to the point.

xeruf avatar Jul 19 '19 12:07 xeruf

{
  "id": null,
  "jsonrpc": "2.0",
  "method": "system.multicall",
  "params": [
    [
      {
        "methodName": "aria2.addUri",
        "params": [
          "token":"TOKEN",
          [
            "https://google.com.jpg"
          ],
          {
            "allow-overwrite": "false",
            "auto-file-renaming": "false",
            "dir": "C://123/",
            "gid": "3D7010A78100A8CA",
            "out": "123213213.jpg"
          }
        ]
      },
      {
        "methodName": "aria2.addUri",
        "params": [
          "token":"TOKEN",
          [
            "https://4455.com"
          ],
          {
            "allow-overwrite": "false",
            "auto-file-renaming": "false",
            "dir": "C://123/",
            "gid": "663B74EDB4189497",
            "out": "123243224.jpg"
          }
        ]
      }
    ]
  ]
}

A quick example would be something like this

Naville avatar Jul 20 '19 18:07 Naville

  • gid: Optional unique identifier. left as null for a2 to generate it.
  • token: Aria2 RPC has an optional security token. you can ignore that field if that a2 instance isn't configured to use one

Eveything else should be pretty self explainary.

You should post it to USER_PROVIDED_RPC_INTERFACE/jsonrpc, an example of the full URL would be http://127.0.0.1:6800/jsonrpc

Naville avatar Jul 20 '19 18:07 Naville

Those remaining fields correspond to the aria2 options listed here: https://aria2.github.io/manual/en/html/aria2c.html#options

Extra docs: https://aria2.github.io/manual/en/html/aria2c.html#rpc-interface

Naville avatar Jul 20 '19 18:07 Naville

Okay, thanks! And how would you suggest integrating it into the existing interface?

xeruf avatar Jul 21 '19 18:07 xeruf

Maybe add a "popup" to the download button (a little arrow on it's side) with the option "Download with ARIA2" ?

defvs avatar Jul 25 '19 16:07 defvs

And btw @Naville that means that sending that rpc request will start a download on any aria2 frontend like uget ? Or will it download in Aria2 web interface ?

defvs avatar Jul 25 '19 16:07 defvs

@defvs Web is just another client using the API accessing the aria2 core service. the same goes for the uget frontend. Sorry for the late reply

Naville avatar Sep 12 '19 05:09 Naville