feat(player): let multi-disc games boot every disc at once - #3988
Draft
gantoine wants to merge 1 commit into
Draft
feat(player): let multi-disc games boot every disc at once#3988gantoine wants to merge 1 commit into
gantoine wants to merge 1 commit into
Conversation
The EmulatorJS player always booted a single file, so multi-disc games could only be played one disc at a time. Booting a multi-file rom whole downloads it as a zip with a generated .m3u, which EmulatorJS boots with its in-game disc switcher. Adds an explicit "All discs" entry to the v2 disc selector, persisted alongside the per-file choice. Sets that ship their own .m3u default to it; every other multi-file rom keeps booting a single file so downloads don't silently grow by a disc. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #3985.
EmulatorJS supports multi-disc playback, but the player always booted a single file, so a multi-disc game could only be played one disc at a time.
The plumbing was already in place on both ends: asking
/api/roms/{id}/content/...for no file in particular returns every file zipped together with a generated.m3u, and EmulatorJS renders its in-game Disk switcher whenever the booted playlist holds more than one disc. This PR just exposes that path in the UI.clearable, which was an unlabelled version of the same thing)..m3udefault to all-discs, matching the backend's own definition of a multi-disc release (Rom.has_m3u_file). Every other multi-file rom keeps booting a single file: pulling a whole set can mean hundreds of extra MB over the wire and in the browser cache, so it stays opt-in.play.all-discskey translated across all 18 locales.Player.vue(v1) is the shared emulator component v2 mounts, so it is the one that persists the choice; the change there is limited to writing the new value instead of deleting the key. v1'sBase.vueis otherwise untouched and behaves exactly as before.Known limitation, worth calling out: on the pinned EmulatorJS 4.2.3 a set of
.chddiscs still boots disc 1, because its ISO/CHD branch takes priority over the cue/m3u branch and the playlist is ignored. Upstreammasterreordered those checks, so a version bump lights CHD sets up with no further frontend work. Cue/bin multi-disc sets work today.Checklist
Please check all that apply.
Verification:
vue-tscclean, full vitest suite green (593 tests, including 15 for the disc-resolution util), production build OK, both i18n checkers pass,trunk fmt && trunk checkclean. Not yet exercised in a browser against a real multi-disc game — that check is still worth doing before merge, which is why this is a draft.Screenshots (if applicable)
N/A — a new entry in the existing disc dropdown.
AI assistance disclosure
This PR was written with AI assistance (Claude Code, Opus 5). The agent investigated the issue, designed and implemented the change, wrote the unit tests, and ran the static checks listed above. All of it was reviewed by me before opening.