diff --git a/src/option_handler_rules.cc b/src/option_handler_rules.cc index dfa84521..37c3e0c1 100644 --- a/src/option_handler_rules.cc +++ b/src/option_handler_rules.cc @@ -514,14 +514,15 @@ initialize_option_handler(Control* c) { variables->insert("timeout_safe_sync", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::timeout_safe_sync), rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_timeout_safe_sync))); - variables->insert("preload_min_pipelined", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_min_pipelined), - rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_min_pipelined))); + variables->insert("preload_type", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_type), + rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_type))); variables->insert("preload_min_size", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_min_size), rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_min_size))); variables->insert("preload_required_rate", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_required_rate), - rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_required_rate))); + rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_required_rate), + 0, (1 << 10))); variables->insert("port_range", new utils::VariableStringSlot(rak::value_fn(std::string()), rak::bind_ptr_fn(&apply_port_range, c))); diff --git a/src/ui/download.cc b/src/ui/download.cc index 2695532e..0c550cd1 100644 --- a/src/ui/download.cc +++ b/src/ui/download.cc @@ -176,6 +176,7 @@ Download::create_info() { element->push_column("Upload:", te_variable_value("up_rate", value_base::flag_kb), " KB / ", te_variable_value("up_total", value_base::flag_xb)); element->push_column("Download:", te_variable_value("down_rate", value_base::flag_kb), " KB / ", te_variable_value("down_total", value_base::flag_xb)); element->push_column("Skipped:", te_variable_value("skip_rate", value_base::flag_kb), " KB / ", te_variable_value("skip_total", value_base::flag_xb)); + element->push_column("Preload:", te_value(&torrent::ChunkManager::preload_type), " / ", te_value(&torrent::ChunkManager::stats_preloaded), " / ", te_value(&torrent::ChunkManager::stats_not_preloaded)); element->set_column_width(element->column_width() + 1);