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, );