Sony serial codes captured from filenames preserved their original casing.
Dash-separated slug filenames (e.g. game-u-slus-00431-.rar) yield a
lowercase serial, but the serial index keys in Redis are uppercase, so the
lookup missed and the ROM went unidentified.
Uppercase the serial before the hget so PS1/PS2/PSP serial matching works
regardless of filename casing.
Closes#3621
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHtzKWXK7nbUDgEmHxpnKc
The rom update endpoint downloads SS media via store_media_file without
re-attaching the user credentials that were stripped before storage, so
edit/update flows fall back to the anonymous quota. Wrap the URL with
add_ss_auth_to_url at the call site, matching the existing scan path.
Add unit tests covering the new URL helpers and edge cases:
- test_base_handler: strip/restore sensitive query params, including
case-insensitive key matching, no-duplicate restoration, special-char
encoding, blank values, and URL-component preservation.
- test_ss_handler: add_ss_auth_to_url honors empty user/password,
doesn't duplicate pre-existing creds, handles the storage-shaped
stripped URL, and round-trips with extract_media_from_ss_game so the
stored URL never carries user creds while the download URL uses the
current runtime creds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Convert `MetadataHandler` to an abstract base class and add an
`is_enabled` class method that allows every metadata handler to
independently report whether it is enabled based on its configuration.
This avoids the need for global variables in the config module, allowing
us to change the enabled state of a metadata handler at runtime if
needed.
Guarantee that cache is initialized during startup, and only once,
instead of every time a `MetadataHandler` object is instantiated.
Also, improve logic to determine `fixtures` paths.