Commit Graph

7 Commits

Author SHA1 Message Date
Georges-Antoine Assi
0332fa085b cleanup backend 2026-07-20 08:39:34 -04:00
Georges-Antoine Assi
a67132a908 Surface never-scanned platform folders in the scan picker
A platform folder created on disk (optionally bound in Library
Management) has no database row until its first scan imports a ROM, so
it was invisible to the scan platform picker and a first scan could not
be triggered for it. The picker also filtered to rom_count > 0, hiding
even zero-ROM database platforms (e.g. those created via romm-cli).

Backend:
- Add GET /platforms/filesystem returning folders on disk without a
  database row yet (locally-resolved metadata, id -1, rom_count 0).
- scan_platforms / the scan socket now accept platform_fs_slugs so a
  folder can be scanned by slug; database platforms stay accepted by id.

Frontend (v2):
- Fetch filesystem folders, key the scan picker by fs_slug, include
  zero-ROM database platforms, and tag never-scanned folders.

Fixes #3832

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 22:13:16 -04:00
TowyTowy
f225a99f89 fix(platforms): include TGDB handler in tgdb_id fallback for supported platforms
get_supported_platforms() resolved tgdb_id from the MobyGames and
Hasheous platform entries only, but MobyGames platforms never carry a
tgdb_id and the Hasheous platform list has no TGDB mappings, so the
explicit key always overrode the value spread from the TGDB handler
with None. Mirror the fallback chain used during scans in
scan_handler.py by falling back to the TGDB platform entry itself.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-17 01:04:45 +02:00
Georges-Antoine Assi
e61d6cd5b8 fix(platforms): stop platform variants from renaming the parent platform
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
2026-07-06 10:17:34 -04:00
Georges-Antoine Assi
4724361f6d refactor: remove per-platform cover aspect-ratio setting
The platform aspect_ratio setting is dropped from the UI and the API
(platform update body + response schema) — nothing consumed it for
rendering, and covers now size to their image's natural aspect.

- SettingsTab: remove the cover-style / aspect-ratio picker (and its
  now-dead helpers, CSS, and unused imports); collapse to a single column.
- update_platform: drop the `aspect_ratio` body field; PlatformSchema no
  longer returns it; utils/platforms stops seeding the default.
- Regenerate the affected frontend types (PlatformSchema, update body).

The DB column stays (out of the update/response scope; dropping it would
be a separate destructive migration) but is no longer read or written
through the API.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 17:43:40 -04:00
zurdi
cc63d19e5c fix: update heartbeat and platforms endpoints to enhance authentication and logging 2025-12-21 16:36:56 +00:00
zurdi
9c8e73e485 feat: refactor platform handling and library structure detection 2025-12-18 01:04:00 +00:00