mirror of https://github.com/aria2/aria2
2009-05-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added web-seeding URI handling in addTorrent command. * src/XmlRpcMethodImpl.ccpull/1/head
parent
98666d33b9
commit
9b9295ce4a
|
@ -1,3 +1,8 @@
|
|||
2009-05-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added web-seeding URI handling in addTorrent command.
|
||||
* src/XmlRpcMethodImpl.cc
|
||||
|
||||
2009-05-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added "length" key to getFiles response.
|
||||
|
|
|
@ -113,7 +113,15 @@ BDE AddTorrentXmlRpcMethod::process
|
|||
throw DlAbortEx("Torrent data is not provided.");
|
||||
}
|
||||
|
||||
// TODO should accept uris from xml rpc request
|
||||
std::deque<std::string> uris;
|
||||
if(params.size() > 1 && params[1].isList()) {
|
||||
for(BDE::List::const_iterator i = params[1].listBegin();
|
||||
i != params[1].listEnd(); ++i) {
|
||||
if((*i).isString()) {
|
||||
uris.push_back((*i).s());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SharedHandle<Option> requestOption(new Option(*e->option));
|
||||
if(params.size() > 2 && params[2].isDict()) {
|
||||
|
@ -121,7 +129,7 @@ BDE AddTorrentXmlRpcMethod::process
|
|||
}
|
||||
std::deque<SharedHandle<RequestGroup> > result;
|
||||
createRequestGroupForBitTorrent(result, requestOption,
|
||||
std::deque<std::string>(),
|
||||
uris,
|
||||
params[0].s());
|
||||
|
||||
if(!result.empty()) {
|
||||
|
|
Loading…
Reference in New Issue