The en_US/en_GB description gained the collections page; carry that into
the other 16 locales so the toggle doesn't describe two of its three
surfaces everywhere but English.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The fallback test only read the rendered list, so it passed whether the
view cleared the query param or merely reset its local filter, and it
seeded the preference before mount so the runtime flip went uncovered.
Hold the setting in a live ref the tests can flip after mount, assert the
router.replace that drops the param, and add the turn-it-off-while-
filtered case.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The v2 collections index fetched and rendered virtual collections
regardless of the `showVirtualCollections` UI setting, so users who
turned the toggle off still got them on the page the v2 UI makes the
primary home for collections. The v2 home page already gates on it,
leaving the two sibling views disagreeing about the same preference.
Read the setting (and the virtual collection type) from useUISettings
rather than raw localStorage, skip the fetch and the list entries when
it is off, drop the virtual option from the toolbar's kind cluster, and
snap a stale `?kind=virtual` back to `all`.
Fixes#4348
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DEFAULT_EXCLUDED_DIRS only ever seeded EXCLUDED_PLATFORMS, but its name
implied it was the general directory list, which is how the media folders
came to be added to it in the first place. Rename it and its superset to
DEFAULT_EXCLUDED_PLATFORM_DIRS and DEFAULT_EXCLUDED_MULTI_FILE_DIRS, and
spell out what a multi-file ROM is.
DEFAULT_EXCLUDED_FILES and DEFAULT_EXCLUDED_EXTENSIONS keep their generic
names: each still feeds both a single-file and a multi-file-parts exclusion.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fold the exporter's folder map and the importer's ESDE_MEDIA_MAP into a
single GAMELIST_MEDIA_DIRS, so writing, reading and skipping a media type
is one edit. This also picks up thumbnails/, which the scan exclusions were
missing, and drops the hand-appended "images" literal.
Serve the multi-file defaults pre-unioned as DEFAULT_EXCLUDED_MULTI_DIRS so
neither UI has to re-join two lists; v1 was still mapping EXCLUDED_MULTI_FILES
to DEFAULT_EXCLUDED_DIRS and rendering the media dirs as deletable.
Collapse the per-tag asset loop and the bespoke <mix> block into one table
keyed by tag, and skip fnmatch for the exclusion patterns that hold no glob
characters, now that the multi-file list is more than twice as long.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`refetchCurrentRom` no longer reads or writes `currentRom`: `syncCachedRom`
owns that write and applies the identity guard. The name promised a function
that acts on the open rom; it fetches the rom it is given and applies it
wherever it is cached, so `refetchRom` is what it does.
Also trims the two comments that had grown past what they explain.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`scan_platforms` ends in four places, and three of them had to remember to
flush the counters a coalesced increment held back. The fourth, the early
return on a folder structure it cannot read, did not, and was correct only
because it sits above the first report. `finish` pairs the flush with the
emit so every exit gets both, including that one.
The failure path's guard around the flush goes with it. It was protecting
against an emit that fails, one line above an emit that would fail the same
way and is not protected, and `update_job_meta` already swallows its own
errors, so it bought nothing.
Also: `refetchCurrentRom` wrote `currentRom` twice, once directly and again
through `syncCachedRom`, which owns that write and applies the same identity
guard. `useRomScanRefresh` kept an `alive` check that `useSocketEvent`'s
unsubscribe already covers; its test was passing on the check rather than the
unsubscribe, so the socket mock now actually unsubscribes. DeleteManualDialog
was the tenth surface still spelling out the refetch by hand, and seven
components kept a rom store binding nothing reads any more.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DEFAULT_EXCLUDED_DIRS feeds both EXCLUDED_PLATFORMS and
EXCLUDED_MULTI_FILES, so listing the gamelist media folders there also
hid any platform directory that happened to share a name. The media
folders now live in DEFAULT_EXCLUDED_MEDIA_DIRS and only join the
multi-file exclusions.
The config response exposes the new list so the settings UI keeps
treating those entries as read-only defaults instead of offering a
remove action that the next config load would undo.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Conflict in the v2 EmulatorJS player was an import collision only: master
added useUnloadGuard where this branch added useSnackbar. Kept both.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A failed EmulatorJS loader (both attempts exhausted) or a Ruffle launch
that cannot create a player left gameRunning set, so the browser asked
for a leave confirmation with no game behind it and input stayed muted.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Nine surfaces each spelled out "fetch the rom, write it to currentRom,
sync the caches", and they had drifted: the notes tab never synced the
gallery cache, the walkthrough subtab updated the v1 store instead of it,
and only the scan refresh guarded against the user opening another game
while the request was in flight. `useRomSync.refetchCurrentRom` does it
once, with the guard, so every asset write reconciles the same way.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The character class held a raw NUL and a raw DEL byte, and a NUL in the
first 8000 bytes makes git treat the whole file as binary: GitHub renders
no diff for it and a merge cannot go three ways. The class is unchanged.
Also drop the second paragraph of the quick scan description.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The platform sync clears `missing_from_fs` before the batch loop runs, so
a rom being scanned can no longer tell that it was missing, and the fold
left the skip path (which could tell) unreachable for a quick scan. A rom
whose file came back byte for byte therefore emitted nothing and kept its
stale badge. Collect the restored roms from the snapshot the loop already
takes, for the ones it visits as well as the ones it skips.
Cleanups on the same paths:
- hoist the quick reconcile above the metadata prelude it never reads,
which was a config file parse and a tag parse per rom
- drop the unreachable quick clause from `_should_hash_incrementally`:
`refresh_rom_files` owns that policy
- drop `RomFilesRefresh.files`, which nothing reads
- take the refresh lock without a guard that had nothing to protect
- fold the single-caller upload destination helpers into one
- give "a quick scan needs no metadata source" one home, and read the
refresh title from the key rom.json already owns
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A quick scan skipped every rom it already knew, so a file dropped into a
game folder went unnoticed until a complete or hashes rescan. This branch
answered that with a seventh scan type; letting quick reconcile the files
of the roms it knows says the same thing with less to learn.
Quick now visits every rom. New ones take the metadata pipeline as
before; existing ones only have their files reconciled against disk,
keeping the stored hashes of files whose size and mtime are unchanged. No
provider is contacted for an existing rom, so quick no longer needs a
metadata source picked, in the scan view, the platform dialog and the per
rom refresh alike.
The watcher schedules a quick scan again, and the per rom "Refresh files"
action sends quick scoped to that rom.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A files scan contacts no provider, but the scan view and the per platform
dialog both kept their start button disabled until one was picked, so the
option they had just gained could not be used. The refresh dialog already
exempted the type.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The per-ROM scan type list restated each option's own subtitle, and the
useScanTrigger header named two callers when four now share it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Backend:
- Drop the HashPolicy enum: FULL had no caller and INCREMENTAL was the
default, so refresh_rom_files uses the existing_files knob directly.
- Narrow RomFilesRefresh to the counters callers read.
- Build ParsedRomFiles once so the incremental return stops dropping the
title id fields.
- Give the assembling suffix one home in config, read by both the
assembler and the scanner's excluded extensions.
- Fold the duplicated destination collision check into one helper, and
branch /start on the upload target itself.
- Load the lighter rom for the refresh emit and the upload endpoints,
keep the flat file stat off the event loop, and reuse the directory
listing for the RA hash lookup.
Frontend:
- Route the platform scan dialog and the scan view through
useScanTrigger, so a scan started while one runs is refused rather
than emitted and rejected by the backend.
- Rename the socket payload type to ScanRequest, away from the
useScanProviders type of the same name.
- Drop the dead uploading prop and folder icon, reuse singleRomTitle,
and resolve each file's relative path once per listing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`.r-v2-shell__app` had no minimum height, so a view shorter than the
viewport left the BottomNav anchor short and the sticky pill floated above
the real bottom edge. Match the shell's min-height so it always reaches it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WbesTQXohyAWWcLV5iiEN
The selection actions become icon-only (download, copy link, delete, clear)
so they sit on the checkbox row instead of wrapping off-screen on narrow
viewports, and each file row gains a delete button gated on the delete grant.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WbesTQXohyAWWcLV5iiEN
`POST /api/roms/upload/start` keeps its X-Upload-* headers so existing
clients are unaffected; the new rom_id and folder travel in an optional
JSON body instead of extra headers.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WbesTQXohyAWWcLV5iiEN
`POST /api/roms/upload/start` reads platform_id, filename, total_size,
total_chunks and the optional rom_id and folder from a JSON payload instead
of X-Upload-* headers. Header values are limited to ISO-8859-1, which also
rejected non-Latin filenames in the browser.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WbesTQXohyAWWcLV5iiEN
Adds the files scan to the scan launchers and a direct "Refresh files"
action in the game menu, shares the socket trigger between them, refetches
the open game when a scan finishes, and routes every Files tab upload
through the chunked upload with a destination dialog for new folders.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WbesTQXohyAWWcLV5iiEN
The optional binding used to no-op in silence: an absent sigil was
indistinguishable from a file with no title id. `SigilService.is_enabled`
plus `FILESYSTEM.TITLE_ID_EXTRACTION_ENABLED` on the heartbeat put the
feature on the same footing as every other optional capability, and give
a client of `PUT /roms/{id}/identity` a way to ask whether the server
reads binaries at all.
The extracted id also reaches the layer that already matches on Switch
product ids. Until now that layer could only scrape one out of the
filename, which made `embed_switch_title_ids` the de facto transport:
users had to let RomM rewrite their filenames for matching to improve.
`switch_product_id` prefers the id read from the binary, so extraction
helps everyone with the binding and the rename stays cosmetic.
MobyGames' `get_rom` takes the rom, like its IGDB and ScreenScraper
siblings, and the product-id lookup now happens only on Switch.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reverts the FileRow hash-chip loop. It was left over from the per-file
version chip that no longer exists, so it is unrelated to title ids.
Cuts the comments that restate the code or defend an obvious choice, and
the `Args:` block on `get_matching_missing_rom` that repeated its own
parameter names. The CNMT content-type rationale now lives only on
`CONTENT_TYPE_CATEGORIES`.
Tests exercise the production path: the title id regex is checked with
`fullmatch`, the way the caller uses it, and `test_identity` builds its
auth header the way every other endpoint test does.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Rename embedding now goes through the handler's own rename primitive
(`rename_fs_rom`), so it inherits the library-root path validation and
per-path locking every other write in that class gets, and builds the new
name with the repo's multi-part extension helpers.
Extraction no longer reads files it can never parse: archives, manuals,
soundtracks and screenshots are skipped, and on non-Switch platforms it
stops after the first result, since only Switch looks at a per-file
content type.
Also collapses the two rom-level branches (dropping a closure), gives the
Switch family one home in RomM's own terms instead of deriving it from
sigil's slug string, logs an unrecognized save target layout instead of
dropping it silently, deletes the `ScannedFSRomValues` mirror of `FSRom`,
drops a dead `rom.version` locale key, and slims the sigil Docker builds
to one layer with a filtered clone.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The previous commit only added the new play.https-required key to
en_US, which fails the check-translations CI job for every other
supported locale. Adds a natural translation of "Must be run over
HTTPS. Contact the site owner." to all 17 remaining locale files,
matching each file's existing formality register (e.g. informal
du/tu/ty in de_DE/es_ES/pl_PL, formal vy/vous in cs_CZ/fr_FR/ru_RU).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
frontend/src/views/ is frozen per this repo's v1-freeze policy (new
frontend work goes in frontend/src/v2/ only); this reverts Base.vue
to its pre-PR state. The real fix already lives in v2's
EmulatorJS.vue (previous commit), which is what actually serves
players on this instance (uiVersion=v2).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Remove the roms_facets backfill from 0115: the steam columns are created by
that same revision, so it was a full-table UPDATE writing NULL over NULL at
container start. Migration 0114, which adds provider columns the same way,
has no backfill either.
Collapse the nine hand-written raw_*_metadata blocks in updateRom into a loop
over raw_metadata, so a new provider no longer needs a copy-pasted block.
Reuse the shared disable_metadata_rate_limiters fixture for the Steam adapter
tests instead of a second local one, move STEAM_PLATFORMS up to the constant
block it belongs to, and trim a test docstring that restated the rationale
already sitting next to resolve_steam_rom.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two review findings on the same theme. RDateField spread the caller's
displayFormat over timeZone: "UTC", so a consumer passing a zone could
desync the label from the grid and reintroduce the off-by-one. The
timezone now wins.
toReleaseDate coerces before testing for emptiness, so "0" is unset like
0 already was, instead of formatting as 1970-01-01.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
RDateField emitted UTC midnight but read the value back with local-time
getters, so west of Greenwich every selection resolved to the previous
day: the field, the grid keys and the selected cell were all off by one.
Move the calendar's arithmetic and its three Intl formatters to UTC, and
keep the Today shortcut on the user's local calendar day.
The read path had the same mismatch. first_release_date is stored as a
UTC-midnight millisecond timestamp, so formatReleaseDate/releaseYear now
give that rule one home and the game details, gallery list and random
pick widget go through them.
Fixes#4321
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Last of the accidental v1 edits. v2's MetadataIdSection already offers
the three fields through its FIELDS array and routes them via
parseSceneId, so nothing is lost. Restores the file to its state on
master, which also drops an unrelated parseInt radix/NaN tweak that
belongs in its own change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Same accident as the setup view: v1 is frozen and v2's Settings metadata
view already lists Demozoo, Pouet and CSDb, with the website and docs
links v1 has no field for. Restores the file to its state on master.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
v1 is frozen; the three sources were added to the classic setup step by
accident. v2's SetupStepMetadata already offers Demozoo, Pouet and CSDb,
so this restores views/Auth/Setup.vue to its state on master.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The new provider keys landed as English text in every locale, and the
metadata-specialised-hint edit that added "demoscene" was only carried into
de_DE. Translate both, following each locale's existing conventions for
provider id labels and the demoscene term.
Values that stay identical to en_US are deliberate: locales that render every
provider id as "X ID" keep that form, and the languages that use "demoscene"
as a loanword keep it untranslated.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Each upload now carries its own ROM and files rather than reading them
back off refs a later drop has already overwritten, and uploads run one
at a time, so a second manual queues instead of being discarded when the
first completes. The dialog no longer disables itself while an upload
runs, since a choice made then simply joins the queue.
The two upload branches differed only by endpoint and message keys, so
they collapse into one table.
Uploading a manual to a single-file ROM warned that it would be
irreversibly converted to a folder ROM, but the dialog already sent such
a ROM straight to the resources path without opening, so the warning
preceded nothing. A ROM that already keeps manuals in its folder now
appends there without asking too, leaving the dialog for the one case
where the destination is still undecided.