From b06a0bbef7ef460e8f4faae7bde8c51bf4719152 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Thu, 10 Sep 2026 11:29:59 -0400 Subject: [PATCH] fix(v2): keep media out of the streaming player's disc surfaces A set with no .cue files listed every rom file as a swap target, so an uploaded manual could be offered as a disc, and the manual-swap hint counted media toward the multi-disc check. Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/v2/views/Player/Stream.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/v2/views/Player/Stream.vue b/frontend/src/v2/views/Player/Stream.vue index 88b7ad398..f1626dcbc 100644 --- a/frontend/src/v2/views/Player/Stream.vue +++ b/frontend/src/v2/views/Player/Stream.vue @@ -80,6 +80,7 @@ import { useSocketEvent } from "@/v2/composables/useSocketEvent"; import { useUnloadGuard } from "@/v2/composables/useUnloadGuard"; import type { SliderBtnGroupItem } from "@/v2/lib/primitives/RSliderBtnGroup/types"; import storeGalleryRoms from "@/v2/stores/galleryRoms"; +import { bootableFiles } from "@/v2/utils/playerDisc"; type PlayerState = "idle" | "loading" | "playing" | "error" | "exited"; type ErrorType = @@ -248,11 +249,13 @@ const hasM3uFile = computed(() => (rom.value?.files ?? []).some((f) => fileExtension(f.file_name) === "m3u"), ); +const bootableRomFiles = computed(() => bootableFiles(rom.value?.files ?? [])); + // Mirrors the download endpoint's playlist filtering: when .cue files are // present only those are valid swap targets (raw .bin tracks are not), and // the .m3u itself is never something to swap to. const discOptions = computed(() => { - const files = (rom.value?.files ?? []).filter( + const files = bootableRomFiles.value.filter( (f) => fileExtension(f.file_name) !== "m3u", ); const cueFiles = files.filter((f) => fileExtension(f.file_name) === "cue"); @@ -275,7 +278,7 @@ const canSwapDisc = computed( const showManualDiscHint = computed( () => capabilities.value.hasManualDiscSwap && - (rom.value?.files?.length ?? 0) > 1 && + bootableRomFiles.value.length > 1 && !isJoining, );