mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 22:52:31 +00:00
* Renamed all commands to from e.g "get_d_*" to "d.get_*". Remember to
update your rc file. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@953 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+7
-7
@@ -154,16 +154,16 @@ Download::create_info() {
|
||||
|
||||
element->push_back("");
|
||||
element->push_column("Directory:", te_string(&torrent::FileList::root_dir));
|
||||
element->push_column("Tied to file:", te_variable_string("get_d_tied_to_file"));
|
||||
element->push_column("Tied to file:", te_variable_string("d.get_tied_to_file"));
|
||||
element->push_column("File stats:",
|
||||
te_branch(&core::Download::c_file_list, &torrent::FileList::is_multi_file, te_string("multi"), te_string("single")),
|
||||
" ", te_value(&torrent::FileList::size_files), " files");
|
||||
|
||||
element->push_back("");
|
||||
element->push_column("Chunks:", te_value(&torrent::FileList::completed_chunks), " / ", te_value(&torrent::FileList::size_chunks), " * ", te_value(&torrent::FileList::chunk_size));
|
||||
element->push_column("Priority:", te_variable_value("get_d_priority"));
|
||||
element->push_column("Priority:", te_variable_value("d.get_priority"));
|
||||
|
||||
element->push_column("State changed:", te_variable_value("get_d_state_changed", value_base::flag_timer | value_base::flag_elapsed));
|
||||
element->push_column("State changed:", te_variable_value("d.get_state_changed", value_base::flag_timer | value_base::flag_elapsed));
|
||||
|
||||
element->push_back("");
|
||||
element->push_column("Memory usage:", te_value(&torrent::ChunkManager::memory_usage, value_base::flag_mb), " MB");
|
||||
@@ -172,15 +172,15 @@ Download::create_info() {
|
||||
element->push_column("Safe diskspace:", te_value(&torrent::ChunkManager::safe_free_diskspace, value_base::flag_mb), " MB");
|
||||
|
||||
element->push_back("");
|
||||
element->push_column("Connection type:", te_variable_string("get_d_connection_current"));
|
||||
element->push_column("Connection type:", te_variable_string("d.get_connection_current"));
|
||||
element->push_column("Safe sync:", te_branch(&torrent::ChunkManager::safe_sync, torrent::chunk_manager(), te_string("yes"), te_string("no")));
|
||||
element->push_column("Send buffer:", te_value(&torrent::ConnectionManager::send_buffer_size, value_base::flag_kb), " KB");
|
||||
element->push_column("Receive buffer:", te_value(&torrent::ConnectionManager::receive_buffer_size, value_base::flag_kb), " KB");
|
||||
|
||||
element->push_back("");
|
||||
element->push_column("Upload:", te_variable_value("get_d_up_rate", value_base::flag_kb), " KB / ", te_variable_value("get_d_up_total", value_base::flag_xb));
|
||||
element->push_column("Download:", te_variable_value("get_d_down_rate", value_base::flag_kb), " KB / ", te_variable_value("get_d_down_total", value_base::flag_xb));
|
||||
element->push_column("Skipped:", te_variable_value("get_d_skip_rate", value_base::flag_kb), " KB / ", te_variable_value("get_d_skip_total", value_base::flag_xb));
|
||||
element->push_column("Upload:", te_variable_value("d.get_up_rate", value_base::flag_kb), " KB / ", te_variable_value("d.get_up_total", value_base::flag_xb));
|
||||
element->push_column("Download:", te_variable_value("d.get_down_rate", value_base::flag_kb), " KB / ", te_variable_value("d.get_down_total", value_base::flag_xb));
|
||||
element->push_column("Skipped:", te_variable_value("d.get_skip_rate", value_base::flag_kb), " KB / ", te_variable_value("d.get_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);
|
||||
|
||||
@@ -288,8 +288,8 @@ DownloadList::receive_exit_input(Input type) {
|
||||
if (current_view()->focus() == current_view()->end_visible())
|
||||
throw torrent::input_error("No download in focus to change root directory.");
|
||||
|
||||
rpc::call_command_d("set_d_directory", *current_view()->focus(), rak::trim(input->str()));
|
||||
control->core()->push_log_std("New root directory \"" + rpc::call_command_d_string("get_d_directory", *current_view()->focus()) + "\" for torrent.");
|
||||
rpc::call_command_d("d.set_directory", *current_view()->focus(), rak::trim(input->str()));
|
||||
control->core()->push_log_std("New root directory \"" + rpc::call_command_d_string("d.get_directory", *current_view()->focus()) + "\" for torrent.");
|
||||
break;
|
||||
|
||||
case INPUT_COMMAND:
|
||||
|
||||
@@ -152,7 +152,7 @@ ElementDownloadList::receive_stop_download() {
|
||||
if (m_view->focus() == m_view->end_visible())
|
||||
return;
|
||||
|
||||
if (rpc::call_command_d_value("get_d_state", *m_view->focus()) == 1)
|
||||
if (rpc::call_command_d_value("d.get_state", *m_view->focus()) == 1)
|
||||
control->core()->download_list()->stop_normal(*m_view->focus());
|
||||
else
|
||||
control->core()->download_list()->erase_ptr(*m_view->focus());
|
||||
@@ -167,7 +167,7 @@ ElementDownloadList::receive_close_download() {
|
||||
|
||||
core::Download* download = *m_view->focus();
|
||||
|
||||
rpc::call_command_d("set_d_ignore_commands", download, (int64_t)1);
|
||||
rpc::call_command_d("d.set_ignore_commands", download, (int64_t)1);
|
||||
|
||||
control->core()->download_list()->stop_normal(download);
|
||||
control->core()->download_list()->close(download);
|
||||
@@ -206,11 +206,11 @@ ElementDownloadList::receive_ignore_ratio() {
|
||||
if (m_view->focus() == m_view->end_visible())
|
||||
return;
|
||||
|
||||
if (rpc::call_command_d_value("get_d_ignore_commands", *m_view->focus()) != 0) {
|
||||
rpc::call_command_d_set_value("set_d_ignore_commands", *m_view->focus(), (int64_t)0);
|
||||
if (rpc::call_command_d_value("d.get_ignore_commands", *m_view->focus()) != 0) {
|
||||
rpc::call_command_d_set_value("d.set_ignore_commands", *m_view->focus(), (int64_t)0);
|
||||
control->core()->push_log("Torrent set to heed commands.");
|
||||
} else {
|
||||
rpc::call_command_d_set_value("set_d_ignore_commands", *m_view->focus(), (int64_t)1);
|
||||
rpc::call_command_d_set_value("d.set_ignore_commands", *m_view->focus(), (int64_t)1);
|
||||
control->core()->push_log("Torrent set to ignore commands.");
|
||||
}
|
||||
}
|
||||
@@ -220,10 +220,10 @@ ElementDownloadList::receive_clear_tied() {
|
||||
if (m_view->focus() == m_view->end_visible())
|
||||
return;
|
||||
|
||||
const std::string& tiedFile = rpc::call_command_d_string("get_d_tied_to_file", *m_view->focus());
|
||||
const std::string& tiedFile = rpc::call_command_d_string("d.get_tied_to_file", *m_view->focus());
|
||||
|
||||
if (!tiedFile.empty()) {
|
||||
rpc::call_command_d_void("d_delete_tied", *m_view->focus());
|
||||
rpc::call_command_d_void("d.delete_tied", *m_view->focus());
|
||||
|
||||
control->core()->push_log("Cleared tied to file association for the selected download.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user