mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 12:12:31 +00:00
Merge chros73 suggestions (filter indicator, "start/stopped" view case)
- Suffix filtered view name with "(filtered)" - Add a check to not filter "start" and "stopped" view
This commit is contained in:
+3
-3
@@ -320,15 +320,15 @@ torrent::Object apply_match(rpc::target_type target, const torrent::Object::list
|
||||
std::transform(text.begin(), text.end(), text.begin(), ::tolower);
|
||||
std::transform(pattern.begin(), pattern.end(), pattern.begin(), ::tolower);
|
||||
|
||||
bool match = false;
|
||||
bool isAMatch = false;
|
||||
try {
|
||||
std::regex re(pattern);
|
||||
match = std::regex_match(text, re);
|
||||
isAMatch = std::regex_match(text, re);
|
||||
} catch (const std::regex_error& exc) {
|
||||
control->core()->push_log_std("regex_error: " + std::string(exc.what()));
|
||||
}
|
||||
|
||||
return match ? (int64_t)true : (int64_t)false;
|
||||
return isAMatch ? (int64_t)true : (int64_t)false;
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
|
||||
Reference in New Issue
Block a user