mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Fix priority up/down for multiple torrents at the same time (closes #692184)
This commit is contained in:
@@ -203,7 +203,7 @@ initializeWindows = function(){
|
||||
}
|
||||
};
|
||||
|
||||
['pause','resume','decreasePrio','increasePrio', 'topPrio', 'bottomPrio', 'recheck'].each(function(item) {
|
||||
['pause','resume', 'recheck'].each(function(item) {
|
||||
addClickEvent(item, function(e){
|
||||
new Event(e).stop();
|
||||
var h = myTable.selectedIds();
|
||||
@@ -219,13 +219,18 @@ initializeWindows = function(){
|
||||
new Request({url: '/command/'+item+'all'}).send();
|
||||
});
|
||||
});
|
||||
|
||||
['decreasePrio','increasePrio', 'topPrio', 'bottomPrio'].each(function(item) {
|
||||
addClickEvent(item, function(e){
|
||||
new Event(e).stop();
|
||||
setPriorityFN(item);
|
||||
});
|
||||
});
|
||||
|
||||
setPriorityFN = function(cmd) {
|
||||
var h = myTable.selectedIds();
|
||||
if(h.length){
|
||||
h.each(function(hash, index){
|
||||
new Request({url: '/command/'+cmd, method: 'post', data: {hash: hash}}).send();
|
||||
});
|
||||
if(h.length) {
|
||||
new Request({url: '/command/'+cmd, method: 'post', data: {hashes: h.join("|")}}).send();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user