* 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:
rakshasa
2007-12-30 04:43:05 +00:00
parent 7b053b969e
commit ce64ea89b1
8 changed files with 47 additions and 47 deletions
+9 -4
View File
@@ -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();
}
}