mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-17 07:32:32 +00:00
* Properly use d.set_directory_base when
* Added get_{up,down}_{rate,total}.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1023 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+9
-4
@@ -100,16 +100,21 @@ parse_options(Control* c, int argc, char** argv) {
|
||||
|
||||
void
|
||||
load_session_torrents(Control* c) {
|
||||
// Load session torrents.
|
||||
std::vector<std::string> l = c->core()->download_store()->get_formated_entries().make_list();
|
||||
utils::Directory entries = c->core()->download_store()->get_formated_entries();
|
||||
|
||||
for (utils::Directory::const_iterator first = entries.begin(), last = entries.end(); first != last; ++first) {
|
||||
// We don't really support session torrents that are links. These
|
||||
// would be overwritten anyway on exit, and thus not really be
|
||||
// useful.
|
||||
if (!first->is_file())
|
||||
continue;
|
||||
|
||||
for (std::vector<std::string>::iterator first = l.begin(), last = l.end(); first != last; ++first) {
|
||||
core::DownloadFactory* f = new core::DownloadFactory(c->core());
|
||||
|
||||
// Replace with session torrent flag.
|
||||
f->set_session(true);
|
||||
f->slot_finished(sigc::bind(sigc::ptr_fun(&rak::call_delete_func<core::DownloadFactory>), f));
|
||||
f->load(*first);
|
||||
f->load(entries.path() + first->d_name);
|
||||
f->commit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user