mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
Merge pull request #1044 from rommapp/romm-1012
[ROMM-1012] Fix multi-file download in gakllery view
This commit is contained in:
@@ -128,8 +128,10 @@ async function removeFromFavourites() {
|
||||
}
|
||||
|
||||
function onDownload() {
|
||||
romsStore.selectedRoms.forEach((rom) => {
|
||||
romApi.downloadRom({ rom });
|
||||
romsStore.selectedRoms.forEach((rom, index) => {
|
||||
setTimeout(() => {
|
||||
romApi.downloadRom({ rom });
|
||||
}, index * 100); // Prevents the download from being blocked by the browser
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -106,7 +106,10 @@ async function downloadRom({
|
||||
}) {
|
||||
const a = document.createElement("a");
|
||||
a.href = getDownloadLink({ rom, files });
|
||||
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
|
||||
// Only connect socket if multi-file download
|
||||
if (rom.multi && files.length > 1) {
|
||||
|
||||
Reference in New Issue
Block a user