Send all rechecks in one request

This commit is contained in:
Thomas Piccirello 2018-07-22 20:33:39 -04:00 committed by sledgehammer999
commit aba80e2b1c
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -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();
}
};