diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-23 22:35:50 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-23 22:38:52 +0900 |
| commit | e83b03b2cd3fa7e70cc8d8acf3560c660aff0bad (patch) | |
| tree | 3e7e793a7b16384fb509443cef20a1573557625e /doc/xmlrpc | |
| parent | 8d8ba403fe9bd9ed5bef02e1d70dc555c5fef3c3 (diff) | |
aria2rpc: Added appendUri command
This command calls aria2.changeUri(GID, fileIndex, [], [URI,...])
internally.
Diffstat (limited to 'doc/xmlrpc')
| -rwxr-xr-x | doc/xmlrpc/aria2rpc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/xmlrpc/aria2rpc b/doc/xmlrpc/aria2rpc index ed34df2d..09b907f7 100755 --- a/doc/xmlrpc/aria2rpc +++ b/doc/xmlrpc/aria2rpc @@ -270,9 +270,12 @@ Usage: #{program_name} addUri URI... [options] #{program_name} shutdown [options] #{program_name} forceShutdown [options] #{program_name} getGlobalStat [options] + #{program_name} appendUri GID fileIndex URI... [options] + This command calls aria2.changeUri(GID, fileIndex, [], [URI,...]) + internally. Options: EOS - + args=opt.parse(ARGV) @@ -307,7 +310,7 @@ options.delete("server") options.delete("port") options.delete("user") options.delete("passwd") - + if command == "addUri" then result=client.call("aria2."+command, resources, options) elsif command == "addTorrent" then @@ -377,6 +380,9 @@ elsif command == "forceShutdown" then result=client.call("aria2."+command) elsif command == "getGlobalStat" then result=client.call("aria2."+command) +elsif command == "appendUri" then + result=client.call("aria2.changeUri", resources[0], resources[1].to_i(), [], + resources[2..-1]) else puts "Command not recognized" exit 1 |
