mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-18 08:02:29 +00:00
* Added "stop_on_ratio" option and display the ratio. Patch by Josef
Drexler, public domain. * Made autogen.sh detect glibtoolize. * Don't resume torrents that are marked as completed yet the initial hash check returns failed chunks. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@704 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -282,6 +282,20 @@ DownloadList::receive_check_hash() {
|
||||
m_control->core()->download_list()->check_hash(*m_view->focus());
|
||||
}
|
||||
|
||||
void
|
||||
DownloadList::receive_ignore_ratio() {
|
||||
if (m_view->focus() == m_view->end_visible())
|
||||
return;
|
||||
|
||||
if ((*m_view->focus())->variable()->get_value("ignore_ratio") > 0) {
|
||||
(*m_view->focus())->variable()->set("ignore_ratio", (int64_t)0);
|
||||
m_control->core()->push_log("Torrent set to stop when reaching upload ratio.");
|
||||
} else {
|
||||
(*m_view->focus())->variable()->set("ignore_ratio", (int64_t)1);
|
||||
m_control->core()->push_log("Torrent set to no longer stop when reaching upload ratio.");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DownloadList::receive_view_input(Input type) {
|
||||
if (m_windowTextInput->get_active())
|
||||
@@ -411,6 +425,7 @@ DownloadList::setup_keys() {
|
||||
(*m_bindings)['\x12'] = sigc::mem_fun(*this, &DownloadList::receive_check_hash);
|
||||
(*m_bindings)['+'] = sigc::mem_fun(*this, &DownloadList::receive_next_priority);
|
||||
(*m_bindings)['-'] = sigc::mem_fun(*this, &DownloadList::receive_prev_priority);
|
||||
(*m_bindings)['I'] = sigc::mem_fun(*this, &DownloadList::receive_ignore_ratio);
|
||||
|
||||
(*m_bindings)['\x7f'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::receive_view_input), INPUT_LOAD_DEFAULT);
|
||||
(*m_bindings)[KEY_BACKSPACE] = sigc::bind(sigc::mem_fun(*this, &DownloadList::receive_view_input), INPUT_LOAD_DEFAULT);
|
||||
|
||||
@@ -130,6 +130,8 @@ private:
|
||||
|
||||
void receive_check_hash();
|
||||
|
||||
void receive_ignore_ratio();
|
||||
|
||||
void receive_view_input(Input type);
|
||||
void receive_exit_input(Input type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user