From 70a73ea441f34d63f90c036e5c5c087f47d69e1d Mon Sep 17 00:00:00 2001 From: rakshasa Date: Sun, 17 Apr 2005 17:54:19 +0000 Subject: [PATCH] Minor bugfixes to find-file interface etc. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@403 e378c898-3ddf-0310-93e7-cc216c733640 --- Makefile.am | 1 + README | 16 +++- TODO | 3 +- configure.ac | 4 +- doc/rtorrent.1.txt | 158 ++++++++++++++++++++++++++++++++++++++++ src/input/path_input.cc | 6 +- src/main.cc | 2 +- src/ui/download.cc | 3 +- 8 files changed, 182 insertions(+), 11 deletions(-) create mode 100644 doc/rtorrent.1.txt diff --git a/Makefile.am b/Makefile.am index f2fdbf9a..f16791e1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS = src EXTRA_DIST= \ autogen.sh \ + doc/rtorrent.1.txt \ rak/algorithm.h \ rak/functional.h \ scripts/checks.m4 diff --git a/README b/README index 3e1c9056..343af8c2 100644 --- a/README +++ b/README @@ -9,8 +9,17 @@ Options and flags: -i Set the IP address sent to the tracker. -p Open a port in the range a to b. - -s Use as the session directory. The torrents will be - saved with the info-hash in hex as the filename. + + -d Sets the default path where the files in the + torrent are found/saved. By default it is "./". + + -s The session directory, all the torrents you add + will be saved there with the info hash as a file + name. When you shutdown rtorrent it will store + fast-resume data in those torrents. Restarting + rtorrent with the sesssion directory will restart + all the torrents you had when you last quit. + All: @@ -58,7 +67,8 @@ In torrent view: 5 - Decrease max peers connected 6 - Increase max peers connected - T - Query tracker + t - Query tracker + T - Force query tracker, ignores min reconnect time sendt by the tracker In file view: diff --git a/TODO b/TODO index e25821f7..011786de 100644 --- a/TODO +++ b/TODO @@ -24,10 +24,11 @@ Make accumulate return the value, no refs please... > slow or broken or for various reasons you don't want to download it. -Make sure it gracefully handles torrents that fail to open files. +Show the bound listening ip. Bug: Add the same torrent while it is hash checking. +Bug: Using ^s on a bad torrent does not catch the exception. RELEASE: diff --git a/configure.ac b/configure.ac index 68df51b6..9af586b6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(rtorrent, 0.1.5, jaris@ifi.uio.no) +AC_INIT(rtorrent, 0.2.0, jaris@ifi.uio.no) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) @@ -39,7 +39,7 @@ TORRENT_CHECK_EXECINFO() TORRENT_CHECK_CURL() TORRENT_OTFD() -PKG_CHECK_MODULES(STUFF, sigc++-2.0 libtorrent >= 0.5.4, +PKG_CHECK_MODULES(STUFF, sigc++-2.0 libtorrent >= 0.6.0, CXXFLAGS="$CXXFLAGS $STUFF_CFLAGS $CURL_CFLAGS"; LIBS="$LIBS $STUFF_LIBS $CURL_LIBS") diff --git a/doc/rtorrent.1.txt b/doc/rtorrent.1.txt new file mode 100644 index 00000000..14cc8b41 --- /dev/null +++ b/doc/rtorrent.1.txt @@ -0,0 +1,158 @@ +//////////////// +// rtorrent.1.txt +// Asciidoc source for rtorrent manpage +// Lee Bigelow +// Use as you will. +// +// processed to manpage with: +// asciidoc -b docbook -d manpage rtorrent.1.txt +// docbook2x-man rtorrent.1.xml +// (or use: xmlto man rtorrent.xml) +// processed to html with: +// asciidoc -b css-embedded -d manpage rtorrent.1.txt +//////////////// + +RTORRENT(1) +=========== +Jari Sundell +v0.1.5, 9 April 2005 + +NAME +---- +rtorrent - rakshasa's ncurses bittorrent client using libtorrent + +SYNOPSIS +-------- +*rtorrent* [-b ip] [-i ip] [-p portrange] [-d directory] [-s directory] [-h] + +DESCRIPTION +----------- +The rtorrent command starts a ncurses based bittorrent downloading front-end +that uses libtorrent to control multiple bittorrent downloads. + +OPTIONS +------- +-b :: + Bind the listening socket to this IP. +-i :: + Set the IP address sent to the tracker. + +-p :: + Open a port in the range a to b. + +-s :: + Use as the session directory. The torrents will be + saved with the info-hash in hex as the filename. + +KEYBOARD CONTROLS +----------------- +All: +~~~~ + +.................................... +Ctrl-q Quit + +a Increase Throttle by 1 KiB +z Decrease Throttle by 1 KiB + +s Increase Throttle by 5 KiB +x Decrease Throttle by 5 KiB + +d Increase Throttle by 50 KiB +c Decrease Throttle by 50 KiB +.................................... + +In main window: +~~~~~~~~~~~~~~~ + +............. +Backspace Activate text input for inserting urls/file + paths. Arrows/C^f/C^b for navigation, enter/C^m. + +Up/Down Select torrent + +Right View torrent + +Ctrl-s Start torrent +Ctrl-d Stop/delete torrent +............... + + +In torrent view: +~~~~~~~~~~~~~~~~ + +............... +Up/Down Select peer + +Left Back to main + +Right View files +p View peer +o View trackers + +1 Decrease max uploads +2 Increase max uploads + +3 Decrease min peers connected +4 Increase min peers connected + +5 Decrease max peers connected +6 Increase max peers connected + +t Query tracker + +* Snub peer +............. + +In file view: +~~~~~~~~~~~~~ + +............ +Up/Down Select file + +Left Back to torrent view + +SpaceBar Change file priority +............ + +RESOURCES +--------- + +Homepage for libtorrent and rtorrent:: + * http://libtorrent.rakshasa.no[] + +Mailing list for libtorrent and rtorrent:: + * Go to http://rakshasa.no/mailman/listinfo/libtorrent-devel[] to + subscribe to the mailing list + * Send your emails to the list at + + + +COPYING +------- + +Copyright (C) 2005 Jari Sundell + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +AUTHOR +------ + +Jari Sundell + +BUGS +---- + +Send bug reports to the authors email address or to the mailing list for libtorrent. diff --git a/src/input/path_input.cc b/src/input/path_input.cc index b6c0a1d0..f3c2c85a 100644 --- a/src/input/path_input.cc +++ b/src/input/path_input.cc @@ -45,8 +45,6 @@ PathInput::pressed(int key) { } else { receive_do_complete(); - - m_showNext = true; } return true; @@ -100,7 +98,9 @@ PathInput::receive_do_complete() { mark_dirty(); // Only emit if there are more than one option. - if (++utils::Directory::iterator(r.first) != r.second) + m_showNext = ++utils::Directory::iterator(r.first) != r.second; + + if (m_showNext) m_signalShowRange.emit(r.first, r.second); } diff --git a/src/main.cc b/src/main.cc index 24856625..4a55a205 100644 --- a/src/main.cc +++ b/src/main.cc @@ -246,7 +246,7 @@ print_help() { std::cout << " spacebar Depends on the current view" << std::endl; std::cout << " 1,2 Adjust max uploads" << std::endl; std::cout << " 3,4,5,6 Adjust min/max connected peers" << std::endl; - std::cout << " t Query tracker for more peers" << std::endl; + std::cout << " t/T Query tracker for more peers / Force query" << std::endl; std::cout << " * Snub peer" << std::endl; std::cout << " right View files" << std::endl; std::cout << " p View peer information" << std::endl; diff --git a/src/ui/download.cc b/src/ui/download.cc index 41a39c58..e3a85584 100644 --- a/src/ui/download.cc +++ b/src/ui/download.cc @@ -243,7 +243,8 @@ Download::bind_keys() { (*m_bindings)['5'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_max_peers), -5); (*m_bindings)['6'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_max_peers), 5); - (*m_bindings)['t'] = sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::set_tracker_timeout), 2 * 1000000); + (*m_bindings)['t'] = sigc::bind(sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::set_tracker_timeout), false), 2 * 1000000); + (*m_bindings)['T'] = sigc::bind(sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::set_tracker_timeout), true), 2 * 1000000); (*m_bindings)['p'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_INFO); (*m_bindings)['o'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_TRACKER_LIST);