mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-18 07:06:18 +00:00
* Cleaned up torrent::Rate and moved it to the API. Changed various
parts of the API to return torrent::Rate instead of specific functions for each stat. * Use 600 second time span for peer rates. * Added core::DownloadFactory which allows for an async http get and changing of settings. This will allow the implementation of a configuration screen when pressing "return", while the client is downloading or finished downloading a torrent file. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@491 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <torrent/rate.h>
|
||||
|
||||
#include "core/download.h"
|
||||
#include "rak/algorithm.h"
|
||||
|
||||
@@ -91,17 +93,17 @@ WindowDownloadList::redraw() {
|
||||
m_canvas->print(0, pos++, "%c Torrent: Done %10.1f MiB Rate: %5.1f / %5.1f KiB Uploaded: %.1f MiB",
|
||||
range.first == m_list->get_focus() ? '*' : ' ',
|
||||
(double)d.get_bytes_total() / (double)(1 << 20),
|
||||
(double)d.get_rate_up() / 1024.0,
|
||||
(double)d.get_rate_down() / 1024.0,
|
||||
(double)d.get_bytes_up() / (double)(1 << 20));
|
||||
(double)d.get_write_rate().rate() / 1024.0,
|
||||
(double)d.get_read_rate().rate() / 1024.0,
|
||||
(double)d.get_write_rate().total() / (double)(1 << 20));
|
||||
else
|
||||
m_canvas->print(0, pos++, "%c Torrent: %6.1f / %6.1f MiB Rate: %5.1f / %5.1f KiB Uploaded: %.1f MiB",
|
||||
range.first == m_list->get_focus() ? '*' : ' ',
|
||||
(double)d.get_bytes_done() / (double)(1 << 20),
|
||||
(double)d.get_bytes_total() / (double)(1 << 20),
|
||||
(double)d.get_rate_up() / 1024.0,
|
||||
(double)d.get_rate_down() / 1024.0,
|
||||
(double)d.get_bytes_up() / (double)(1 << 20));
|
||||
(double)d.get_write_rate().rate() / 1024.0,
|
||||
(double)d.get_read_rate().rate() / 1024.0,
|
||||
(double)d.get_write_rate().total() / (double)(1 << 20));
|
||||
|
||||
m_canvas->print(0, pos++, "%c %s",
|
||||
range.first == m_list->get_focus() ? '*' : ' ',
|
||||
|
||||
Reference in New Issue
Block a user