Menu

#159 Needed XML-RPC functions

closed
nobody
None
5
2012-09-28
2009-12-18
Anonymous
No

I'm in the process of writing a perl module and webui for aria2 which will (hopefully) someday evolve into a multi-node download manager able to download to multiple machines, controlled from multiple machines, with multiple interfaces. It will likely have a sqlite database to assist in dynamically setting post-download/etc functions, however as-is now aria2 does not provide certain information that I believe shouldn't be stored externally upon setting:

  • One can change things with changeGlobalOption, changeOption, but there is no getGlobalOption, getOption.
  • There are also a number of set-once options in addUri/etc that would be lost if not recorded externally. Since there is no ability to 'pause' (but would be greatly appreciated), one must remove / re-add downloads. If a download is not added by a client that stores it's parameters externally, then pause/remove-read might break a download.
  • Ideally it would be nice to get the runtime options (except xml-rpc-user/pass), and to set them - however I suspect the latter would be a pain to implement.

Discussion

  • Anonymous

    Anonymous - 2009-12-18

    Addition: AFAIK all adduri options would need to be re-set by a function that moves a waiting download up or down in the queue, unless the ability to change queue position is also added.

     
  • tujikawa

    tujikawa - 2009-12-20

    I agree that there is no way to tell option values other than those set by add* method. OK, I'll add getOption and getGlobalOption method.
    I think it would be good to keep option value by external application. We have made aria2 download utility core, rather than would-be "manager" application.
    I'm also considering to add moveUp and moveDown method, which changes the position in waiting queue.

    perl module and webui for aria2
    It's very interesting, is there any project page ?

     
  • Nobody/Anonymous

    Thank you, this will help. Regarding the other variables, fetching global options isn't really needed, no, but the per-download options (ie the ones added for individual downloads by -i / addurl / etc, such as (ftp|http)-(user|passwd) ) are more dynamic. I figure since they're already stored in aria2's memory space somewhere it wouldn't add too much bloat to spit them out as an xml struct, and that would add stability to xmlrpc clients...tracking what one sets isn't a problem, until you take into account anything that doesn't use that particular client.

    ex: aria2rpc ruby script used to add a http auth protected download, then aria2web losing login data when restarting/moving the download.

    No project page for my schemes, though I have a mostly functional module that will be posted once it's complete, (which may involve further gutting of RPC::XML::Client to remove deps and silly data assumptions). The webui should follow shortly after.

    The multi-node system is currently an unholy mixture of azureus(to be replaced), ssh tunnels, ext3 xattr, a googletalk bot, several cgi scripts, and aria2c, which has taken the place of 'freedownloadmanager' on my windows machine. (Since the latter has no rpc of any sort, and urls via commandline and nothing else). It's all quite functional, amazingly enough, but needs a rewrite for public consumption.

     
  • tujikawa

    tujikawa - 2009-12-21

    I implemented getOption, getGlobalOption and changePosition XML-RPC method in svn trunk.

       aria2.getOption gid
    
       This method returns options of the download denoted by gid. The
       response is of type struct. Its key is the name of option. The value
       type is string.
    
       aria2.changePosition gid, pos, how
    
       This method changes the position of the download denoted by gid. pos is
       of type integer. how is of type string. If how is "POS_SET", it moves
       the download to a position relative to the beginning of the queue. If
       how is "POS_CUR", it moves the download to a position relative to the
       current position. If how is "POS_END", it moves the download to a
       position relative to the end of the queue. If the destination position
       is less than 0 or beyond the end of the queue, it moves the download to
       the beginning or the end of the queue respectively. The response is of
       type integer and it is the destination position.
    
       For example, if GID#1 is placed in position 3, aria2.changePosition(1,
       -1, POS_CUR) will change its position to 2. Additional
       aria2.changePosition(1, 0, POS_SET) will change its position to 0(the
       beginning of the queue).
    
     
  • tujikawa

    tujikawa - 2009-12-26

    Since the necessary XML-RPC methods have been implemented, I close this issue.

     

Log in to post a comment.

Auth0 Logo