From 34bb225618e70c9e60d962c8cd60fddbc8be2814 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Thu, 5 Jun 2025 20:56:07 -0700 Subject: [PATCH] WebUI: Always show Auto Torrent Management option This behavior is consistent with the GUI. --- src/webui/www/private/scripts/contextmenu.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/webui/www/private/scripts/contextmenu.js b/src/webui/www/private/scripts/contextmenu.js index 6ab9a0c12..687a8c1cf 100644 --- a/src/webui/www/private/scripts/contextmenu.js +++ b/src/webui/www/private/scripts/contextmenu.js @@ -331,7 +331,6 @@ window.qBittorrent.ContextMenu ??= (() => { let there_are_force_start = false; let all_are_super_seeding = true; let all_are_auto_tmm = true; - let there_are_auto_tmm = false; let thereAreV1Hashes = false; let thereAreV2Hashes = false; const tagCount = new Map(); @@ -366,9 +365,7 @@ window.qBittorrent.ContextMenu ??= (() => { else there_are_force_start = true; - if (data["auto_tmm"] === true) - there_are_auto_tmm = true; - else + if (data["auto_tmm"] !== true) all_are_auto_tmm = false; if (data["infohash_v1"] !== "") @@ -446,13 +443,7 @@ window.qBittorrent.ContextMenu ??= (() => { else if (!there_are_stopped && !there_are_force_start) this.hideItem("start"); - if (!all_are_auto_tmm && there_are_auto_tmm) { - this.hideItem("autoTorrentManagement"); - } - else { - this.showItem("autoTorrentManagement"); - this.setItemChecked("autoTorrentManagement", all_are_auto_tmm); - } + this.setItemChecked("autoTorrentManagement", all_are_auto_tmm); this.setEnabled("copyInfohash1", thereAreV1Hashes); this.setEnabled("copyInfohash2", thereAreV2Hashes);