From d5c2ef4ce99db07bedd6313683ac3ff0f2052400 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 16 Jun 2011 21:37:15 +0900 Subject: 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. --- src/SessionSerializer.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/SessionSerializer.cc') 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 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"; + } } } } -- cgit