mirror of https://github.com/aria2/aria2
aria2rpc: Added appendUri command
This command calls aria2.changeUri(GID, fileIndex, [], [URI,...]) internally.pull/28/head
parent
8d8ba403fe
commit
e83b03b2cd
|
@ -270,9 +270,12 @@ Usage: #{program_name} addUri URI... [options]
|
||||||
#{program_name} shutdown [options]
|
#{program_name} shutdown [options]
|
||||||
#{program_name} forceShutdown [options]
|
#{program_name} forceShutdown [options]
|
||||||
#{program_name} getGlobalStat [options]
|
#{program_name} getGlobalStat [options]
|
||||||
|
#{program_name} appendUri GID fileIndex URI... [options]
|
||||||
|
This command calls aria2.changeUri(GID, fileIndex, [], [URI,...])
|
||||||
|
internally.
|
||||||
Options:
|
Options:
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
|
|
||||||
args=opt.parse(ARGV)
|
args=opt.parse(ARGV)
|
||||||
|
|
||||||
|
@ -307,7 +310,7 @@ options.delete("server")
|
||||||
options.delete("port")
|
options.delete("port")
|
||||||
options.delete("user")
|
options.delete("user")
|
||||||
options.delete("passwd")
|
options.delete("passwd")
|
||||||
|
|
||||||
if command == "addUri" then
|
if command == "addUri" then
|
||||||
result=client.call("aria2."+command, resources, options)
|
result=client.call("aria2."+command, resources, options)
|
||||||
elsif command == "addTorrent" then
|
elsif command == "addTorrent" then
|
||||||
|
@ -377,6 +380,9 @@ elsif command == "forceShutdown" then
|
||||||
result=client.call("aria2."+command)
|
result=client.call("aria2."+command)
|
||||||
elsif command == "getGlobalStat" then
|
elsif command == "getGlobalStat" then
|
||||||
result=client.call("aria2."+command)
|
result=client.call("aria2."+command)
|
||||||
|
elsif command == "appendUri" then
|
||||||
|
result=client.call("aria2.changeUri", resources[0], resources[1].to_i(), [],
|
||||||
|
resources[2..-1])
|
||||||
else
|
else
|
||||||
puts "Command not recognized"
|
puts "Command not recognized"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue