Commit Graph

3 Commits

Author SHA1 Message Date
Georges-Antoine Assi
97a16e2c79 refactor: tighten comments and tests on the sigil branch
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>
2026-09-02 17:13:20 -04:00
Georges-Antoine Assi
bcafc3d504 refactor(scan): tighten the sigil title id plumbing
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>
2026-09-02 16:34:36 -04:00
nendo
53bdc371cd refactor(scan): give Switch title-id knowledge its own module
What a base-game id looks like, how to recover one from an update or DLC
id, and how a content type maps to a category are facts about the
platform, not about scanning a filesystem, and they sat in the middle of
a handler that is nine hundred lines of other concerns. The rename that
embeds an id stays with the filesystem code that owns file operations
and imports the patterns it needs.
2026-08-30 13:23:54 +09:00