diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-06-16 21:37:15 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-06-16 21:37:15 +0900 |
| commit | d5c2ef4ce99db07bedd6313683ac3ff0f2052400 (patch) | |
| tree | 3d64d7173f297dd027ba2d2bca9c5f5c30750f3a /src/SessionSerializer.cc | |
| parent | c0d1e981338f9c5f94d2ac600acff5efd340e495 (diff) | |
Added --pause option.
This option pauses download after added. This option is effective only
when --enable-rpc=true is given. When --save-session option is used
and there are paused downloads, they are saved with --pause=true so
that it will become paused state when the session is recovered.
Diffstat (limited to 'src/SessionSerializer.cc')
| -rw-r--r-- | src/SessionSerializer.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/SessionSerializer.cc b/src/SessionSerializer.cc index 4c5acc3c..e904a5ff 100644 --- a/src/SessionSerializer.cc +++ b/src/SessionSerializer.cc @@ -192,6 +192,11 @@ void SessionSerializer::save(std::ostream& out) const groups.begin(), eoi = groups.end(); itr != eoi; ++itr) { SharedHandle<DownloadResult> result = (*itr)->createDownloadResult(); writeDownloadResult(out, metainfoCache, result); + // PREF_PAUSE was removed from option, so save it here looking + // property separately. + if((*itr)->isPauseRequested()) { + out << " " << PREF_PAUSE << "=true" << "\n"; + } } } } |
