From 13075e50993b405b5b162d1e359a0879b3c4f75e Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Sun, 22 Jul 2018 20:33:39 -0400 Subject: [PATCH] Send all rechecks in one request --- src/webui/www/private/scripts/mocha-init.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index b1cdc811e..49a5f893d 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -387,15 +387,13 @@ initializeWindows = function() { recheckFN = function() { var hashes = torrentsTable.selectedRowsIds(); if (hashes.length) { - hashes.each(function(hash, index) { - new Request({ - url: 'api/v2/torrents/recheck', - method: 'post', - data: { - hashes: hash - } - }).send(); - }); + new Request({ + url: 'api/v2/torrents/recheck', + method: 'post', + data: { + hashes: hashes.join("|"), + } + }).send(); updateMainData(); } };