mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
@@ -1437,9 +1437,16 @@ window.qBittorrent.DynamicTable = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
if ((filterTerms !== undefined) && (filterTerms !== null)
|
||||
&& (filterTerms.length > 0) && !window.qBittorrent.Misc.containsAllTerms(name, filterTerms))
|
||||
return false;
|
||||
if ((filterTerms !== undefined) && (filterTerms !== null)) {
|
||||
if (filterTerms instanceof RegExp) {
|
||||
if (!filterTerms.test(name))
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if ((filterTerms.length > 0) && !window.qBittorrent.Misc.containsAllTerms(name, filterTerms))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
@@ -1471,8 +1478,11 @@ window.qBittorrent.DynamicTable = (function() {
|
||||
const filteredRows = [];
|
||||
|
||||
const rows = this.rows.getValues();
|
||||
const useRegex = $('torrentsFilterRegexBox').checked;
|
||||
const filterText = $('torrentsFilterInput').value.trim().toLowerCase();
|
||||
const filterTerms = (filterText.length > 0) ? filterText.split(" ") : null;
|
||||
const filterTerms = (filterText.length > 0)
|
||||
? (useRegex ? new RegExp(filterText) : filterText.split(" "))
|
||||
: null;
|
||||
|
||||
for (let i = 0; i < rows.length; ++i) {
|
||||
if (this.applyFilter(rows[i], selected_filter, selected_category, selectedTag, selectedTracker, filterTerms)) {
|
||||
|
||||
Reference in New Issue
Block a user