Make the active torrents filter reflect actual transfers

PR #23431.
Closes #23121.
This commit is contained in:
Hanabishi
2025-11-24 11:03:20 +05:00
committed by GitHub
parent 1b96a48266
commit 4a3922d152
2 changed files with 3 additions and 25 deletions

View File

@@ -1552,7 +1552,7 @@ window.qBittorrent.DynamicTable ??= (() => {
}
applyFilter(row, filterName, category, tag, trackerHost, filterTerms) {
const state = row["full_data"].state;
const { state, upspeed, dlspeed } = row["full_data"];
let inactive = false;
switch (filterName) {
@@ -1592,11 +1592,7 @@ window.qBittorrent.DynamicTable ??= (() => {
inactive = true;
// fallthrough
case "active": {
let r;
if (state === "stalledDL")
r = (row["full_data"].upspeed > 0);
else
r = (state === "metaDL") || (state === "forcedMetaDL") || (state === "downloading") || (state === "forcedDL") || (state === "uploading") || (state === "forcedUP");
const r = (upspeed > 0) || (dlspeed > 0);
if (r === inactive)
return false;
break;