mirror of https://github.com/aria2/aria2
--checksum option is now available in aria2.changeOption.
--checksum option is now available in aria2.changeOption if download is waiting/paused in queue.pull/2/head
parent
7cba24e8b2
commit
95c7cb9f3e
|
@ -751,6 +751,7 @@ OptionHandlerFactory::createOptionHandlers()
|
|||
op->addTag(TAG_HTTP);
|
||||
op->addTag(TAG_CHECKSUM);
|
||||
op->setInitialOption(true);
|
||||
op->setChangeOptionForReserved(true);
|
||||
handlers.push_back(op);
|
||||
}
|
||||
#endif // ENABLE_MESSAGE_DIGEST
|
||||
|
|
|
@ -1119,7 +1119,15 @@ void changeOption
|
|||
const Option& option,
|
||||
DownloadEngine* e)
|
||||
{
|
||||
const SharedHandle<DownloadContext>& dctx = group->getDownloadContext();
|
||||
group->getOption()->merge(option);
|
||||
if(option.defined(PREF_CHECKSUM)) {
|
||||
std::pair<std::string, std::string> p;
|
||||
util::divide(p, option.get(PREF_CHECKSUM), '=');
|
||||
util::lowercase(p.first);
|
||||
util::lowercase(p.second);
|
||||
dctx->setDigest(p.first, util::fromHex(p.second));
|
||||
}
|
||||
if(option.defined(PREF_MAX_DOWNLOAD_LIMIT)) {
|
||||
group->setMaxDownloadSpeedLimit
|
||||
(option.getAsInt(PREF_MAX_DOWNLOAD_LIMIT));
|
||||
|
|
Loading…
Reference in New Issue