diff --git a/src/webui/www/private/css/style.css b/src/webui/www/private/css/style.css
index 5fc361c4a..7de894368 100644
--- a/src/webui/www/private/css/style.css
+++ b/src/webui/www/private/css/style.css
@@ -449,6 +449,10 @@ a.propButton img {
width: 26px;
}
+#torrentsFilterSelect {
+ padding: 2px 4px;
+}
+
#torrentFilesFilterToolbar {
float: right;
margin-right: 30px;
diff --git a/src/webui/www/private/index.html b/src/webui/www/private/index.html
index 4fb09c62b..d2fb8c4b8 100644
--- a/src/webui/www/private/index.html
+++ b/src/webui/www/private/index.html
@@ -133,6 +133,11 @@
+
+
diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js
index f26a1bdfa..e8980c474 100644
--- a/src/webui/www/private/scripts/client.js
+++ b/src/webui/www/private/scripts/client.js
@@ -1563,9 +1563,8 @@ window.addEventListener("DOMContentLoaded", () => {
torrentsTable.updateTable();
}, window.qBittorrent.Misc.FILTER_INPUT_DELAY);
});
- $("torrentsFilterRegexBox").addEventListener("change", () => {
- torrentsTable.updateTable();
- });
+
+ document.getElementById("torrentsFilterToolbar").addEventListener("change", (e) => { torrentsTable.updateTable(); });
$("transfersTabLink").addEventListener("click", showTransfersTab);
$("searchTabLink").addEventListener("click", showSearchTab);
diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js
index 1b12b8d3b..e68f2398c 100644
--- a/src/webui/www/private/scripts/dynamicTable.js
+++ b/src/webui/www/private/scripts/dynamicTable.js
@@ -1357,7 +1357,6 @@ window.qBittorrent.DynamicTable ??= (() => {
applyFilter: function(row, filterName, categoryHash, tagHash, trackerHash, filterTerms) {
const state = row["full_data"].state;
- const name = row["full_data"].name.toLowerCase();
let inactive = false;
switch (filterName) {
@@ -1487,12 +1486,14 @@ window.qBittorrent.DynamicTable ??= (() => {
}
if ((filterTerms !== undefined) && (filterTerms !== null)) {
+ const filterBy = document.getElementById("torrentsFilterSelect").value;
+ const textToSearch = row["full_data"][filterBy].toLowerCase();
if (filterTerms instanceof RegExp) {
- if (!filterTerms.test(name))
+ if (!filterTerms.test(textToSearch))
return false;
}
else {
- if ((filterTerms.length > 0) && !window.qBittorrent.Misc.containsAllTerms(name, filterTerms))
+ if ((filterTerms.length > 0) && !window.qBittorrent.Misc.containsAllTerms(textToSearch, filterTerms))
return false;
}
}