Restrict extracted audio cover bytes to JPEG/PNG via magic-byte sniffing
instead of trusting the declared MP4 imageformat, so a GIF (or missing
format) is no longer mislabeled and persisted as image/jpeg.
MP4Cover.FORMAT_PNG was referenced via a non-existent MP4.Cover attribute,
breaking cover extraction for m4a files. Add unit tests and guard
extract_embedded_cover so failures do not abort the upload path.
Sort library media so image entries precede video entries (stable sort
keeps original order within each group), and use a type-predicate filter
so the result stays typed as RomArtworkEntry[].
Generated-By: PostHog Code
Task-Id: fad7faa2-a17e-4583-a816-1b9915ba138f
Type the #item/#thumbnail slot payloads by inferring T from the `items`
prop, so consumers drop the per-slot casts. Props move to a sibling
types.ts (RCarouselProps<TItem>) since an inline interface leaks into the
generic component's default export.
Generated-By: PostHog Code
Task-Id: fad7faa2-a17e-4583-a816-1b9915ba138f
The direct ROM-file endpoints (`get_romfile` and `get_romfile_content`)
resolved a RomFile purely by its user-supplied id and never mapped it
back to the parent Rom, so an authenticated user with roms.read could
read or download a file of a ROM hidden from them by knowing/guessing
the RomFile.id, bypassing the hidden ROM/platform policy.
Resolve the parent Rom and apply assert_rom_visible (404-masking) before
returning any file bytes or metadata, matching the ROM-level content
endpoints and the existing check in patch.py.
Generated-By: PostHog Code
Task-Id: 149c191c-7a22-4cf6-aafd-4dcf53f4fba0
Validate the per-game and per-platform cores independently so a stale
or unsupported per-game core falls through to a valid per-platform core
instead of jumping straight to the first supported core.
Generated-By: PostHog Code
Task-Id: 6cc47d8f-2bb8-4424-ba58-e595fe947444
The auth_background.svg fallback contains two infinite CSS animations.
As a full-viewport background-image under a 28px blur (and re-sampled by
every backdrop-filter surface), Firefox's WebRender re-rasterizes the
whole viewport every frame, pegging the renderer/GPU. It is worst on
pages that fall back to this art (settings, administration) since they
call setBgArt(null); other pages show static cover art.
Swap to the existing static variant in Firefox only via the
@-moz-document url-prefix() hack (the same pattern v1's Auth.vue already
uses). Other browsers keep the animation. The BackgroundArt fallback is
moved from an inline style into CSS so the override can take effect.
Generated-By: PostHog Code
Task-Id: d82d41fa-0db7-477d-bb80-fc512558e076
Persist the selected EmulatorJS core per-game and fall back to the
per-platform default when a game has no saved core. The per-platform
key is still written so it acts as the default for new games on that
platform.
Closes#2042
Generated-By: PostHog Code
Task-Id: 6cc47d8f-2bb8-4424-ba58-e595fe947444
The /api/sync/negotiate endpoint pairs saves on (rom_id, slot) and
excludes null-slot server saves from pairing, so a client save sent with
slot=null always negotiates as an upload even when an identical file
exists on the server. This is intentional but was undocumented, which
led to confusion (issue #3697).
Add Field descriptions to the request and response schemas and expand
the endpoint docstring to explain the pairing rule and recommend a
stable slot name (e.g. "autosave"). Regenerate frontend types.
Generated-By: PostHog Code
Task-Id: 9f1c9eee-6365-4223-8cd1-b50e7d7b9cf0
reject_unauthorized_scan and should_scan_rom are imported from the test
module, so they are not private to scan.py; drop the leading underscore.
Generated-By: PostHog Code
Task-Id: 54ea2f32-9e01-404d-885c-543d8685abdd
The scan and scan:stop Socket.IO handlers performed no authorization, so
any client reaching /ws could trigger a full library rescan (including a
complete scan that deletes on-disk media before re-fetching) or abort an
administrator's in-progress scan without any credentials.
Gate both handlers on the same TASKS_RUN scope the REST task endpoints
require, resolved from the server-side session identity stored on connect
rather than from any client-supplied value.
Generated-By: PostHog Code
Task-Id: 54ea2f32-9e01-404d-885c-543d8685abdd
Preselect the ROM's own platform in the patcher upload target and move
the platform dropdown below the output filename field.
Generated-By: PostHog Code
Task-Id: 2245878d-8f72-4dd7-aadf-781a8edde9fe
The collections index gated its skeleton and empty state only on
fetchingCollections, so a slow virtual fetch (the "all" type on large
libraries) left the "no collections yet" empty state on screen for 10s+.
Gate loading on all collection kinds and add a virtual-section skeleton
for when curated collections are already present.
Generated-By: PostHog Code
Task-Id: 66644ee6-e16d-4b19-8ee3-8d91ca932e02
Back out all gallery grid tab-navigation changes (single-tab-stop roving
and its test); this will be tackled on a separate branch. The focus-ring
fixes (RBtn, RTabNav) and the scroller tabindex opt-out (GalleryShell)
are unrelated and stay.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
Drop the in-card action access from the gallery grid entirely: the
gamepad X/Y entry point, the in-action-row arrow/Escape nav, the
cellActions helper, GameCard's :focus-within overlay reveal, and the
related test. The grid keeps card-to-card nav and a single tab stop;
a card's actions are reached via the detail page.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
Drop the single-tab-stop + arrow/Home/End roving added to AlphaStrip and
its test; the strip returns to native per-letter tabbing. No useGridNav
changes backed the strip (its roving was self-contained), so nothing else
to unwind there.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
Remove the keyboard triggers for entering a card's action row; gamepad
X/Y remains the way in (with D-pad + B for nav/exit). Keeps the action
row out of scope for a keyboard trigger until a non-conflicting key is
chosen.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
Space already toggles a card's selection in multi-select, so it can't
double as the "open card actions" trigger. Back to ContextMenu / Shift+F10
(keyboard) and gamepad X/Y; a macOS-friendly keyboard trigger is TBD.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
The ContextMenu key and Shift+F10 don't exist / aren't context-menu
shortcuts on macOS, so keyboard users there had no way into a card's
actions. Add Space as the cross-platform trigger (only when focus is on
the card itself), keeping ContextMenu / Shift+F10 for Windows / Linux and
gamepad X/Y. Space is always swallowed on a card so it never scrolls the
grid.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
The single-tab-stop grid keeps a GameCard's overlay action buttons
(status/download/favorite/more/play) out of the Tab order, so they were
unreachable without a mouse. useGridNav now lets the ContextMenu key /
Shift+F10 (keyboard) or X/Y (gamepad) drop focus into the focused card's
action row; from there Arrow keys move between the actions and Escape
returns to the card. GameCard keeps its overlay revealed on :focus-within
so the actions are visible while navigating them. Adds tests.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
The virtual_collections view joined roms_metadata (itself a heavy
COALESCE/JSON view) once per collection type, evaluating it ~5x per
listing. Factor the roms<->roms_metadata join into a single base CTE
that each collection CTE unnests from. Output is identical.
Generated-By: PostHog Code
Task-Id: 10289bf4-b0d0-4856-80c9-1be93c926f37
Revert the gallery grid to a single-tab-stop model: Tab lands on the
active/first card, Arrow keys do the 2D nav, and the next Tab leaves to
the following region. Hidden in-card overlay buttons stay out of the tab
order.
Apply the same pattern to AlphaStrip: it's now one tab stop (the current
letter, else the first available), with Arrow Up/Down + Home/End moving
between the available letters and skipping unavailable ones. Adds tests.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
- useGridNav: keep every card in the Tab order (Tab walks card → card)
while pulling the hidden in-card hover-overlay action buttons out of it
(tabindex="-1"), applied eagerly on mount and re-synced as virtualised
rows mount/unmount. Adds tests.
- GalleryShell: opt the virtual scroller out of the tab order
(tabindex="-1") so Tab no longer lands on the scroll container.
- RBtn: stop the scoped `outline: none` from swallowing the global
modality-gated focus ring; only clear the native UA outline for
non-focus-visible (mouse) focus, so keyboard/pad show the branded ring.
- RTabNav: replace the outline focus ring (clipped into vertical slivers
by the nav's overflow) with a contained, rounded inset focus highlight.
Generated-By: PostHog Code
Task-Id: 2dcae833-1422-499e-bf58-0c555cf5e96e
The v2 patcher tab now appears for every game, not only ROMs that bundle
nested patch files. The patch source can be either a library patch file
(as before) or a patch uploaded from disk, which is applied server-side
and never stored in the library, so users don't have to keep patches
around until they need them. Download and upload-to-RomM options are
unchanged.
Backend: POST /roms/{id}/patch now accepts multipart form data with
either patch_file_id or an uploaded patch_file (exactly one). The upload
is streamed to a temp dir in bounded chunks, validated for extension and
size, applied, and removed after streaming. Scope stays ROMS_READ since
the patch is temp-only.
Frontend: added a Library/Upload source toggle (shown only when the ROM
bundles patches) using RDropzone, and the request now sends FormData.
Regenerated OpenAPI types and dropped the now-unused no-patch-files key.
Generated-By: PostHog Code
Task-Id: d0fc3734-585d-44bc-aaa9-481a3cd6a23b
The virtual_collections view read only roms.igdb_metadata, so franchises,
genres, companies and play modes set manually or provided by non-IGDB sources
(ScreenScraper, Flashpoint, gamelist) never produced auto-generated
collections, even though the same values already drove /api/roms filtering and
the game detail page.
Redefine the view to source each grouping from the roms_metadata view, which
coalesces manual and provider metadata in priority order. Matching values now
merge into a single collection regardless of their source. The 3-ROM minimum
threshold is unchanged.
Fixes#3187
Generated-By: PostHog Code
Task-Id: 10289bf4-b0d0-4856-80c9-1be93c926f37
get_supported_platforms built a slug->platform map with a plain dict
comprehension. When a folder is mapped as a variant or alias of an
existing platform, scanning resolves it to the parent slug, so two
platform rows share the same slug. The comprehension let the later row
(the variant) overwrite the parent, renaming it in the platform picker
and Folder Mappings page.
Prefer the canonical platform (fs_slug == slug) when building the map so
a variant folder no longer shadows its parent.
Fixes#3157
Generated-By: PostHog Code
Task-Id: 571866ea-86a0-49c2-b62e-dbea077d0181