mirror of https://github.com/aria2/aria2
Add --save-not-found option
parent
852e2db586
commit
414dd14dec
File diff suppressed because one or more lines are too long
|
@ -1348,6 +1348,13 @@ Advanced Options
|
||||||
BitTorrent seeding which is recognized as completed state.
|
BitTorrent seeding which is recognized as completed state.
|
||||||
Default: ``false``
|
Default: ``false``
|
||||||
|
|
||||||
|
.. option:: --save-not-found[=true|false]
|
||||||
|
|
||||||
|
Save download with :option:`--save-session <--save-session>` option
|
||||||
|
even if the file was not found on the server. This option also saves
|
||||||
|
control file in that situations.
|
||||||
|
Default: ``true``
|
||||||
|
|
||||||
.. option:: --gid=<GID>
|
.. option:: --gid=<GID>
|
||||||
|
|
||||||
Set GID manually. aria2 identifies each download by the ID called
|
Set GID manually. aria2 identifies each download by the ID called
|
||||||
|
|
|
@ -343,6 +343,17 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
|
||||||
op->setChangeOptionForReserved(true);
|
op->setChangeOptionForReserved(true);
|
||||||
handlers.push_back(op);
|
handlers.push_back(op);
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
OptionHandler* op(new BooleanOptionHandler(
|
||||||
|
PREF_SAVE_NOT_FOUND, TEXT_SAVE_NOT_FOUND, A2_V_TRUE,
|
||||||
|
OptionHandler::OPT_ARG));
|
||||||
|
op->addTag(TAG_ADVANCED);
|
||||||
|
op->setInitialOption(true);
|
||||||
|
op->setChangeOption(true);
|
||||||
|
op->setChangeGlobalOption(true);
|
||||||
|
op->setChangeOptionForReserved(true);
|
||||||
|
handlers.push_back(op);
|
||||||
|
}
|
||||||
{
|
{
|
||||||
OptionHandler* op(
|
OptionHandler* op(
|
||||||
new BooleanOptionHandler(PREF_FORCE_SEQUENTIAL, TEXT_FORCE_SEQUENTIAL,
|
new BooleanOptionHandler(PREF_FORCE_SEQUENTIAL, TEXT_FORCE_SEQUENTIAL,
|
||||||
|
|
|
@ -286,6 +286,10 @@ bool SessionSerializer::save(IOFile& fp) const
|
||||||
case error_code::IN_PROGRESS:
|
case error_code::IN_PROGRESS:
|
||||||
save = saveInProgress_;
|
save = saveInProgress_;
|
||||||
break;
|
break;
|
||||||
|
case error_code::RESOURCE_NOT_FOUND:
|
||||||
|
case error_code::MAX_FILE_NOT_FOUND:
|
||||||
|
save = saveError_ && dr->option->getAsBool(PREF_SAVE_NOT_FOUND);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
save = saveError_;
|
save = saveError_;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -349,6 +349,8 @@ PrefPtr PREF_STOP_WITH_PROCESS = makePref("stop-with-process");
|
||||||
PrefPtr PREF_ENABLE_MMAP = makePref("enable-mmap");
|
PrefPtr PREF_ENABLE_MMAP = makePref("enable-mmap");
|
||||||
// value: true | false
|
// value: true | false
|
||||||
PrefPtr PREF_FORCE_SAVE = makePref("force-save");
|
PrefPtr PREF_FORCE_SAVE = makePref("force-save");
|
||||||
|
// value: true | false
|
||||||
|
PrefPtr PREF_SAVE_NOT_FOUND = makePref("save-not-found");
|
||||||
// value: 1*digit
|
// value: 1*digit
|
||||||
PrefPtr PREF_DISK_CACHE = makePref("disk-cache");
|
PrefPtr PREF_DISK_CACHE = makePref("disk-cache");
|
||||||
// value: string
|
// value: string
|
||||||
|
|
|
@ -302,6 +302,8 @@ extern PrefPtr PREF_STOP_WITH_PROCESS;
|
||||||
extern PrefPtr PREF_ENABLE_MMAP;
|
extern PrefPtr PREF_ENABLE_MMAP;
|
||||||
// value: true | false
|
// value: true | false
|
||||||
extern PrefPtr PREF_FORCE_SAVE;
|
extern PrefPtr PREF_FORCE_SAVE;
|
||||||
|
// value: true | false
|
||||||
|
extern PrefPtr PREF_SAVE_NOT_FOUND;
|
||||||
// value: 1*digit
|
// value: 1*digit
|
||||||
extern PrefPtr PREF_DISK_CACHE;
|
extern PrefPtr PREF_DISK_CACHE;
|
||||||
// value: string
|
// value: string
|
||||||
|
|
|
@ -971,6 +971,11 @@
|
||||||
" situations. This may be useful to save\n" \
|
" situations. This may be useful to save\n" \
|
||||||
" BitTorrent seeding which is recognized as\n" \
|
" BitTorrent seeding which is recognized as\n" \
|
||||||
" completed state.")
|
" completed state.")
|
||||||
|
#define TEXT_SAVE_NOT_FOUND \
|
||||||
|
_(" --save-not-found[=true|false] Save download with --save-session option even\n" \
|
||||||
|
" if the file was not found on the server. This\n" \
|
||||||
|
" option also saves control file in that\n" \
|
||||||
|
" situations.")
|
||||||
#define TEXT_DISK_CACHE \
|
#define TEXT_DISK_CACHE \
|
||||||
_(" --disk-cache=SIZE Enable disk cache. If SIZE is 0, the disk cache\n" \
|
_(" --disk-cache=SIZE Enable disk cache. If SIZE is 0, the disk cache\n" \
|
||||||
" is disabled. This feature caches the downloaded\n" \
|
" is disabled. This feature caches the downloaded\n" \
|
||||||
|
|
Loading…
Reference in New Issue