diff options
author | xsmile | 2018-05-05 17:26:48 +0200 |
---|---|---|
committer | xsmile | 2018-05-05 17:26:48 +0200 |
commit | b2d2007e7745da76cbd1798482e8407fa18f9700 (patch) | |
tree | 1bda87da70310711ffb32741335b9d61ee4ca503 | |
parent | 2dc12354ffe0f0bfabb7bcdae9480109ce7d2b34 (diff) | |
download | aur-b2d2007e7745da76cbd1798482e8407fa18f9700.tar.gz |
update
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | command_pyroscope.cc | 24 | ||||
-rw-r--r-- | ps-log_messages_all.patch | 33 |
4 files changed, 64 insertions, 5 deletions
@@ -1,6 +1,6 @@ pkgbase = rtorrent-ps pkgdesc = Extended rTorrent distribution with UI enhancements, colorization, and some added features - pkgver = 1.0.r180.g66e43c4 + pkgver = 1.0.r185.g11b26b7 pkgrel = 1 url = https://github.com/pyroscope/rtorrent-ps arch = any @@ -21,6 +21,7 @@ pkgbase = rtorrent-ps source = ps-info-pane-xb-sizes_all.patch source = ps-issue-515_all.patch source = ps-item-stats-human-sizes_all.patch + source = ps-log_messages_all.patch source = ps-ssl_verify_host_all.patch source = ps-throttle-steps_all.patch source = ps-ui_pyroscope_all.patch @@ -31,7 +32,7 @@ pkgbase = rtorrent-ps source = ui_pyroscope.h source = ui_pyroscope.patch md5sums = b8b4009f95f8543244ae1d23b1810d7c - md5sums = 4ad3ae94e76106add9e228ac768c9881 + md5sums = fa1ec27799203e8e63135aba22c06a87 md5sums = 56701bca42cc9b309637bf3f918ede12 md5sums = 22fae392c6e281dc438b39a5019e7e1b md5sums = 3fd739c0d5a9442f0cdec9ed5a720eaa @@ -40,6 +41,7 @@ pkgbase = rtorrent-ps md5sums = f1539d70c74e5c74d8a15d51675aa26c md5sums = c438a91cd3e58edebf39fce06587641a md5sums = 2d34e8c86c1c6ed1354b55ca21819886 + md5sums = a4f5a4da3397e4b1d71eb59a5e8e0279 md5sums = cef14e9011d4b4af92536b02f8b611c2 md5sums = ee76d57dfbc40e09eeaee3845d327d94 md5sums = 7a88f8ab5d41242fdf1428de0e2ca182 @@ -3,7 +3,7 @@ _pkgname=rtorrent pkgname=rtorrent-ps _pkgver=0.9.6 -pkgver=1.0.r180.g66e43c4 +pkgver=1.0.r185.g11b26b7 pkgrel=1 pkgdesc='Extended rTorrent distribution with UI enhancements, colorization, and some added features' url='https://github.com/pyroscope/rtorrent-ps' @@ -22,6 +22,7 @@ source=("https://github.com/rakshasa/$_pkgname/archive/$_pkgver.tar.gz" 'ps-info-pane-xb-sizes_all.patch' 'ps-issue-515_all.patch' 'ps-item-stats-human-sizes_all.patch' + 'ps-log_messages_all.patch' 'ps-ssl_verify_host_all.patch' 'ps-throttle-steps_all.patch' 'ps-ui_pyroscope_all.patch' @@ -32,7 +33,7 @@ source=("https://github.com/rakshasa/$_pkgname/archive/$_pkgver.tar.gz" 'ui_pyroscope.h' 'ui_pyroscope.patch') md5sums=('b8b4009f95f8543244ae1d23b1810d7c' - '4ad3ae94e76106add9e228ac768c9881' + 'fa1ec27799203e8e63135aba22c06a87' '56701bca42cc9b309637bf3f918ede12' '22fae392c6e281dc438b39a5019e7e1b' '3fd739c0d5a9442f0cdec9ed5a720eaa' @@ -41,6 +42,7 @@ md5sums=('b8b4009f95f8543244ae1d23b1810d7c' 'f1539d70c74e5c74d8a15d51675aa26c' 'c438a91cd3e58edebf39fce06587641a' '2d34e8c86c1c6ed1354b55ca21819886' + 'a4f5a4da3397e4b1d71eb59a5e8e0279' 'cef14e9011d4b4af92536b02f8b611c2' 'ee76d57dfbc40e09eeaee3845d327d94' '7a88f8ab5d41242fdf1428de0e2ca182' diff --git a/command_pyroscope.cc b/command_pyroscope.cc index c1797a9b750a..480158e09294 100644 --- a/command_pyroscope.cc +++ b/command_pyroscope.cc @@ -513,6 +513,27 @@ d_multicall_filtered(const torrent::Object::list_type& args) { } +/* throttle.names= + + Returns a list of all defined throttle names, + including the built-in ones (i.e. '' and NULL). + + https://github.com/pyroscope/rtorrent-ps/issues/65 + */ +torrent::Object cmd_throttle_names() { + torrent::Object result = torrent::Object::create_list(); + torrent::Object::list_type& resultList = result.as_list(); + + resultList.push_back(std::string()); + for (core::ThrottleMap::const_iterator itr = control->core()->throttles().begin(); + itr != control->core()->throttles().end(); itr++) { + resultList.push_back(itr->first); + } + + return result; +} + + torrent::Object::value_type apply_string_contains(bool ignore_case, const torrent::Object::list_type& args) { if (args.size() < 2) { throw torrent::input_error("string.contains[_i] takes at least two arguments!"); @@ -679,13 +700,14 @@ void initialize_command_pyroscope() { #endif #if RT_HEX_VERSION <= 0x000906 - // these are merged into 0.9.7+ mainline! + // these are merged into 0.9.7+ mainline! (well, maybe, PRs are ignored) CMD2_ANY_STRING("system.env", _cxxstd_::bind(&cmd_system_env, _cxxstd_::placeholders::_2)); CMD2_ANY("ui.current_view", _cxxstd_::bind(&cmd_ui_current_view)); CMD2_ANY_LIST("system.random", &apply_random); CMD2_ANY_LIST("d.multicall.filtered", _cxxstd_::bind(&d_multicall_filtered, _cxxstd_::placeholders::_2)); #endif + CMD2_ANY("throttle.names", _cxxstd_::bind(&cmd_throttle_names)); CMD2_ANY_LIST("string.contains", &cmd_string_contains); CMD2_ANY_LIST("string.contains_i", &cmd_string_contains_i); CMD2_ANY_LIST("string.map", &cmd_string_map); diff --git a/ps-log_messages_all.patch b/ps-log_messages_all.patch new file mode 100644 index 000000000000..045f1d963a9e --- /dev/null +++ b/ps-log_messages_all.patch @@ -0,0 +1,33 @@ +--- a/src/core/manager.cc 2017-04-30 20:32:33.000000000 +0100 ++++ b/src/core/manager.cc 2018-04-20 15:45:33.380910446 +0100 +@@ -36,6 +36,7 @@ + + #include "config.h" + ++#include <ctime> + #include <cstdio> + #include <cstring> + #include <fstream> +@@ -83,6 +84,22 @@ void + Manager::push_log(const char* msg) { + m_log_important->lock_and_push_log(msg, strlen(msg), 0); + m_log_complete->lock_and_push_log(msg, strlen(msg), 0); ++ ++ extern int log_messages_fd; ++ if (log_messages_fd >= 0) { ++ char buf[30]; ++ time_t t = std::time(0); ++ std::tm* now = std::localtime(&t); ++ ++ snprintf(buf, sizeof(buf), "%04u-%02u-%02u %2d:%02d:%02d ", ++ 1900 + now->tm_year, now->tm_mon + 1, now->tm_mday, ++ now->tm_hour, now->tm_min, now->tm_sec); ++ ++ std::string line(buf); ++ line += msg; ++ line += '\n'; ++ ::write(log_messages_fd, line.c_str(), line.length()); ++ } + } + + Manager::Manager() : |