Commit Graph

387 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
ce5624b470 Add index on rom_files(rom_id) to fix PostgreSQL performance issue
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/7bb628cb-282d-44c3-b912-9c81212611a9

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-04-14 02:35:19 +00:00
Georges-Antoine Assi
4928041593 manual cleanu 2026-04-12 11:04:12 -04:00
Georges-Antoine Assi
6df31e2cc0 Merge branch 'master' into libretro-handler 2026-04-12 10:14:26 -04:00
Georges-Antoine Assi
522df9d31a feat: add libretro thumbnails as an artwork source
Adds the libretro thumbnail repository as a first-class artwork source so
region-correct box art (PAL/Europe, Japan, etc.) can be matched directly
to ROM filenames, addressing rommapp/romm#3239.

Implementation follows the SGDB handler pattern (artwork-only, no game
metadata): MetadataSource enum entry, scan-time fetch wired into the
SCAN_ARTWORK_PRIORITY loop, /search/roms integration, MatchRom dialog
chip + cover selection, and a heartbeat flag.

Matching is exact case-insensitive against the directory listing first
(so a ROM named "(Europe)" lands on the (Europe) artwork), with a
JaroWinkler fuzzy fallback at 0.8 that strips parenthetical tags from
both sides. Listings are cached in Redis with a 24h TTL.

`libretro_id` is persisted on the Rom model as the SHA1 hex of the
matched libretro filename — stable across scans, distinct per region,
indexed for lookup. Migration 0077 adds the column.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:57:20 -04:00
Georges-Antoine Assi
3991e1b6ed fix: scan stalls on platforms with 10k+ already-scanned ROMs
The scan was spending excessive time on large platforms even when all ROMs
were already scanned. Root causes: per-ROM UPDATE queries for skipped ROMs
(10k individual writes), missing composite index on (platform_id, fs_name)
causing full table scans, NOT IN clauses with 10k+ values in
mark_missing_roms(), and redundant filesystem reads.

Changes:
- Add bulk_mark_present() for batch-updating skipped ROMs in one query
- Move skip detection from _identify_rom to the batch loop so skipped ROMs
  never enter the async scan pipeline, and report progress for them
- Add composite index idx_roms_platform_id_fs_name via migration 0077
- Rewrite mark_missing_roms() with flip-based approach: mark all missing,
  then un-mark present ones in chunks of 1000
- Cache filesystem reads in scan_platforms() to avoid double directory
  traversal (precounting + scanning)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 19:20:40 -04:00
Georges-Antoine Assi
ae03b0b322 ingest playtime with sync sessions 2026-04-06 21:32:13 -04:00
Georges-Antoine Assi
e5cb29ae80 Merge branch 'master' into feature/play-session-ingest 2026-04-06 12:42:15 -04:00
Georges-Antoine Assi
f2e8e337b2 Merge branch 'master' into save-sync 2026-04-05 21:47:53 -04:00
Georges-Antoine Assi
7c41fb5bac revert fs_name sibling roms 2026-04-05 17:57:48 -04:00
Abdessamad Derraz
6aa543c3ff fix: correct ZX Spectrum +3 ROM hashes 2026-03-27 16:43:06 +01:00
nendo
75302ed59a Add play session ingest for game time tracking
Backend API for collecting and querying play sessions, modeled after
the Argosy session data format. Clients submit batches per device,
recording both the session window and screen-on time.
2026-03-22 20:22:55 +09:00
Georges-Antoine Assi
e1b07cacfc make devices actually unique 2026-03-15 20:09:33 -04:00
Georges-Antoine Assi
b3fbbf59fb add tests 2026-03-14 23:35:04 -04:00
Georges-Antoine Assi
e6ddc5da11 bot attempt at save sync 2026-03-14 22:13:38 -04:00
nendo
ea5b7546aa refactor: address PR #3114 review feedback
- Use atomic getdel for pairing code exchange
- Add cascade="all, delete-orphan" to User.client_tokens
- Move generate/hash_client_token into AuthHandler as static methods
- Extract endpoint helpers to utils/client_tokens.py
2026-03-11 10:56:35 +09:00
nendo
d97791f1d4 fix: address PR review feedback
- Add back_populates="client_tokens" to ClientToken.user relationship
- Fix rate limit race condition: increment-first pattern instead of
  read-then-write
- Remove unused User import from tests
- Add i18n keys to all non-en_US locales
2026-03-11 10:56:35 +09:00
nendo
e0b25fbc6c feat(client-tokens): add client API tokens with QR pairing flow
Long-lived, revocable, scope-restricted tokens for external clients
(mobile apps, retro handhelds, third-party tools). Includes:

- Backend: model, migration, DB handler, auth integration (rmm_ prefix
  routing in HybridAuthBackend), CRUD + pairing + exchange endpoints,
  rate limiting, scope intersection enforcement, admin oversight
- Frontend: settings page with token management table, stepped
  create/deliver dialog (config -> copy/pair), QR code with RomM logo,
  admin token table, standalone /pair page for QR scan landing
- /pair page supports custom-scheme callbacks for app deep linking,
  falls back to displaying code for manual entry
- 33 backend tests across 5 classes (CRUD, auth, isolation, pairing,
  admin)
2026-03-11 10:56:35 +09:00
Georges-Antoine Assi
478b7b970a run fmt 2026-03-10 16:53:36 -04:00
Jamie Bond
1e6f0d6000 Add property for path_video and refactor places which use similar logic to access video paths 2026-03-10 20:32:54 +01:00
Georges-Antoine Assi
6461078721 loosen rules around fetch matching screenshots 2026-02-19 10:18:56 -05:00
Georges-Antoine Assi
bbb1ba3ec0 cahanges from bot review 2026-02-19 09:36:12 -05:00
Georges-Antoine Assi
5b1dfe2ba1 [ROMM-3031] Fix screenshot property on save/state 2026-02-18 23:23:35 -05:00
Georges-Antoine Assi
c6e9ce5bbd filter out non-owned collections when adding 2026-02-08 09:52:55 -05:00
Georges-Antoine Assi
0da88e4727 Merge pull request #2984 from zeroSteiner/fix/issue/2451
Fix #2451: Group games with same name but different tags as versionsr
2026-02-03 23:27:41 -05:00
Spencer McIntyre
d95899333f Add the migration for the new view 2026-02-03 20:12:54 -05:00
nendo
a236123e4f feat(saves): add slot-based save sync with content hash deduplication
- Add device registration and save synchronization
- Implement slot-based save organization with datetime tagging
- Add conflict detection for multi-device sync scenarios
- Add content hash computation for save deduplication
- Support ZIP inner-file hashing for consistent deduplication
- Add confirm_download endpoint for sync state management
- Add overwrite parameter to bypass conflict checks
2026-01-31 21:57:22 +09:00
Georges-Antoine Assi
24fef1139b Merge branch 'master' into feature/device-registration-save-sync 2026-01-28 19:42:57 -05:00
Georges-Antoine Assi
e50016b26b Add CHEAT to RomFile category types 2026-01-25 19:18:43 -05:00
nendo
36eec298d1 Add device-based save synchronization
Implement device registration and save sync tracking to enable
multi-device save management with conflict detection.

- Device CRUD endpoints (POST/GET/PUT/DELETE /api/devices)
- Save sync state tracking per device
- Conflict detection on upload (409 when device has stale sync)
- Download sync tracking (optimistic and confirmed modes)
- Track/untrack saves per device
- DEVICES_READ/WRITE scopes for authorization
2026-01-18 16:50:44 +09:00
DevOldSchool
331ed76187 Applied feedback from gemini code assist review. 2026-01-05 12:38:07 +10:00
DevOldSchool
86a6804447 Added player count metadata from SS. Displays on game detail screen and added a filter under search for player counts. 2026-01-05 11:57:30 +10:00
SaraVieira
fe14067667 feature: Add addtional editable metadata 2026-01-02 17:30:05 +00:00
zurdi
8eb9668275 Merge branch 'master' into 816-uiux-make-user-settings-cross-browserdevice 2025-12-31 11:48:25 +00:00
zurdi
649597b494 fix RA badgeds download 2025-12-31 01:34:37 +00:00
Georges-Antoine Assi
734645aa07 cache top level files 2025-12-30 16:45:32 -05:00
Georges-Antoine Assi
a45bde142e [HOTFIX] Multi roms should only consider top-level files 2025-12-30 16:37:55 -05:00
Georges-Antoine Assi
0971026f95 Add support for version tag 2025-12-30 11:37:06 -05:00
zurdi
ec4d157905 Add user UI settings management and update related components
- Introduced `ui_settings` column in the users table via Alembic migration.
- Updated UserForm and UserSchema models to include `ui_settings`.
- Enhanced user update endpoint to handle `ui_settings`.
- Created a new composable `useUISettings` for managing UI settings with local storage.
- Refactored UI components to utilize the new `useUISettings` for theme and language settings.
2025-12-16 23:16:36 +00:00
Georges-Antoine Assi
324932184a Move merged_screenshots and merged_ra_metadata to simple RomSchema 2025-12-02 10:32:17 -05:00
Georges-Antoine Assi
d69271dd33 remove Rom.multi 2025-12-02 10:25:40 -05:00
zurdi
4699358e9e feat: clean up RomNote class by removing redundant user__username property 2025-11-20 16:16:28 +00:00
zurdi
03083d4b69 feat: implement multi-note management with CRUD operations and database migration 2025-11-20 15:38:11 +00:00
zurdi
09cb5af74e Merge remote-tracking branch 'origin/master' into feature/fucking-multi-notes 2025-11-14 19:57:45 +00:00
zurdi
33fa0beeaf feat: Implement multi-note management for ROM users
- Updated .gitignore to exclude copilot-instructions.md
- Added migration script 0055_multi_notes.py to convert single note fields to a multi-note JSON structure in the database.
- Refactored RomUserSchema to replace note_raw_markdown and note_is_public with a notes dictionary.
- Introduced UserNoteSchema for representing individual notes.
- Created MultiNoteManager.vue component for managing user notes in the frontend.
- Integrated MultiNoteManager into Personal.vue for displaying and editing notes.
- Updated API service to include multi-note management functions.
- Enhanced NoteDialog.vue to display multiple notes.
- Updated localization files to include new strings related to notes.
- Adjusted Vite configuration to allow additional host for development.
2025-11-14 19:57:13 +00:00
Georges-Antoine Assi
cc309983ff fix scrolling and test 2025-10-31 11:50:51 -04:00
Georges-Antoine Assi
f8b0ae63a1 fix scanning multi file games with ssfr 2025-10-31 10:50:51 -04:00
Georges-Antoine Assi
1eabcfb9f4 Add PSP Pkgi support 2025-10-27 20:36:53 -04:00
Georges-Antoine Assi
38f42aa352 Merge branch 'master' into romm-2536 2025-10-23 18:24:36 -04:00
Georges-Antoine Assi
64c2689862 changes from self review 2025-10-23 17:15:19 -04:00
Georges-Antoine Assi
f919951a22 self code cleanup 2025-10-23 10:36:08 -04:00