Skip to content

[ROMM-1949] Fix multi rom download #2206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 6, 2025
Merged

[ROMM-1949] Fix multi rom download #2206

merged 3 commits into from
Aug 6, 2025

Conversation

gantoine
Copy link
Member

@gantoine gantoine commented Aug 5, 2025

Description
Explain the changes or enhancements you are proposing with this pull request.

Await download start for first files before queuing the next file for download.

Fixes #1949

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

@gantoine gantoine requested review from zurdi15 and Copilot August 5, 2025 00:44
Copy link

trunk-io bot commented Aug 5, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copilot

This comment was marked as outdated.

@gantoine gantoine requested a review from Copilot August 5, 2025 00:57
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the multi-ROM download functionality by implementing proper sequencing and timing controls. Instead of relying on basic setTimeout delays that could cause browser blocking, it introduces a more robust system that waits for each download to start before initiating the next one.

  • Replaces the simple setTimeout approach with a Promise-based download system
  • Adds configurable delay constants for better control over download timing
  • Introduces a dedicated bulkDownloadRoms function to handle multiple ROM downloads sequentially

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
frontend/src/services/api/rom.ts Adds Promise-based download system with configurable delays and new bulk download function
frontend/src/components/Gallery/FabOverlay.vue Updates download handler to use the new bulk download API

@gantoine gantoine merged commit eacd2cb into master Aug 6, 2025
8 checks passed
@gantoine gantoine deleted the romm-1949 branch August 6, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Multi-select downloads one rom only
1 participant