mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
parent
5dcc14153f
commit
d63e0ad78f
2 changed files with 11 additions and 1 deletions
|
@ -44,6 +44,7 @@ window.qBittorrent.Misc = (function() {
|
|||
safeTrim: safeTrim,
|
||||
toFixedPointString: toFixedPointString,
|
||||
containsAllTerms: containsAllTerms,
|
||||
sleep: sleep,
|
||||
MAX_ETA: 8640000
|
||||
};
|
||||
};
|
||||
|
@ -218,6 +219,12 @@ window.qBittorrent.Misc = (function() {
|
|||
});
|
||||
};
|
||||
|
||||
const sleep = (ms) => {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
};
|
||||
|
||||
return exports();
|
||||
})();
|
||||
|
||||
|
|
|
@ -1004,7 +1004,7 @@ const initializeWindows = function() {
|
|||
return torrentsTable.selectedRowsIds().join("\n");
|
||||
};
|
||||
|
||||
exportTorrentFN = function() {
|
||||
exportTorrentFN = async function() {
|
||||
const hashes = torrentsTable.selectedRowsIds();
|
||||
for (const hash of hashes) {
|
||||
const row = torrentsTable.rows.get(hash);
|
||||
|
@ -1022,6 +1022,9 @@ const initializeWindows = function() {
|
|||
document.body.appendChild(element);
|
||||
element.click();
|
||||
document.body.removeChild(element);
|
||||
|
||||
// https://stackoverflow.com/questions/53560991/automatic-file-downloads-limited-to-10-files-on-chrome-browser
|
||||
await window.qBittorrent.Misc.sleep(200);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue