mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 22:22:31 +00:00
add 'd.multicall.filtered' command
This commit is contained in:
@@ -295,6 +295,16 @@ View::filter() {
|
||||
emit_changed();
|
||||
}
|
||||
|
||||
void
|
||||
View::filter_by(const torrent::Object& condition, View::base_type& result)
|
||||
{
|
||||
// std::copy_if(begin_visible(), end_visible(), result.begin(), view_downloads_filter(condition));
|
||||
view_downloads_filter matches = view_downloads_filter(condition);
|
||||
for (iterator itr = begin_visible(); itr != end_visible(); ++itr)
|
||||
if (matches(*itr))
|
||||
result.push_back(*itr);
|
||||
}
|
||||
|
||||
void
|
||||
View::filter_download(core::Download* download) {
|
||||
iterator itr = std::find(base_type::begin(), base_type::end(), download);
|
||||
|
||||
@@ -120,6 +120,7 @@ public:
|
||||
|
||||
// Need to explicity trigger filtering.
|
||||
void filter();
|
||||
void filter_by(const torrent::Object& condition, base_type& result);
|
||||
void filter_download(core::Download* download);
|
||||
|
||||
const torrent::Object& get_filter() const { return m_filter; }
|
||||
|
||||
Reference in New Issue
Block a user