diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 062c51763..e9530a2b6 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -158,7 +158,7 @@ namespace void applyToTorrents(const QStringList &idList, Func func) requires std::invocable { - if ((idList.size() == 1) && (idList[0] == u"all" || idList[0] == u"*")) + if ((idList.size() == 1) && ((idList[0] == u"all") || (idList[0] == u"*"))) { for (BitTorrent::Torrent *const torrent : asConst(BitTorrent::Session::instance()->torrents())) func(torrent); diff --git a/src/webui/www/private/scripts/prop-trackers.js b/src/webui/www/private/scripts/prop-trackers.js index 9a9c293f5..945688aef 100644 --- a/src/webui/www/private/scripts/prop-trackers.js +++ b/src/webui/www/private/scripts/prop-trackers.js @@ -178,10 +178,10 @@ window.qBittorrent.PropTrackers ??= (() => { }); const addTrackerFN = () => { - const selectedTorrents = torrentsTable.selectedRowsIds(); if (current_hash.length === 0) return; + const selectedTorrents = torrentsTable.selectedRowsIds(); if (selectedTorrents.length !== 0) current_hash = selectedTorrents.map(encodeURIComponent).join("|"); @@ -231,10 +231,10 @@ window.qBittorrent.PropTrackers ??= (() => { }; const removeTrackerFN = (element) => { - const selectedTorrents = torrentsTable.selectedRowsIds(); if (current_hash.length === 0) return; + const selectedTorrents = torrentsTable.selectedRowsIds(); if (selectedTorrents.length !== 0) current_hash = selectedTorrents.map(encodeURIComponent).join("|");