Commit Graph

3538 Commits

Author SHA1 Message Date
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
Georges-Antoine Assi
14c0676f1a Merge pull request #2917 from tmgast/feature/device-registration-save-sync
Add device-based save synchronization
2026-02-03 23:25:23 -05:00
nendo
34f48e58a1 feat(devices): default to returning existing device on duplicate registration
Change allow_existing default to True so duplicate fingerprint matches
return the existing device (200) instead of 409 Conflict. Add model
validator to force allow_existing=False when allow_duplicate is set.
2026-02-04 11:10:40 +09:00
Spencer McIntyre
624f4ce14d Update the romm view to group by fs no tag 2026-02-03 20:22:59 -05:00
Spencer McIntyre
d95899333f Add the migration for the new view 2026-02-03 20:12:54 -05:00
Georges-Antoine Assi
959c9ac0bf refactor feeds file 2026-02-03 17:09:21 -05:00
Georges-Antoine Assi
4b4a34631d bot created test file 2026-02-03 16:48:58 -05:00
Georges-Antoine Assi
d0a71ae5fe add new endpoints for pkgj 2026-02-03 16:22:39 -05:00
Cobaltboy
90694133c6 Added Automatic Gamelist export support 2026-02-03 19:42:45 +05:30
nendo
e3642523f9 refactor(saves): simplify SaveSchema construction with model_validate
Add model_validator to SaveSchema that safely handles SQLAlchemy lazy
relationships by checking inspect(obj).unloaded before attribute access.
This allows direct use of model_validate(orm_obj) instead of manually
building a dict and excluding device_syncs.
2026-02-03 21:05:03 +09:00
nendo
8ae07d77f3 test: add device duplicate handling tests and fix saves hash import
Add tests for duplicate device registration scenarios (409 conflict,
allow_existing, allow_duplicate, reset_syncs). Fix compute_file_hash
function references after relocation to assets_handler.
2026-02-03 20:48:35 +09:00
nendo
132e0ad256 refactor(utils): extract to_utc function to utils/datetime.py
Move UTC datetime normalization to a dedicated utils module for
reusability across the codebase.
2026-02-03 20:07:47 +09:00
nendo
bf8cb92e93 refactor(assets): move content hash functions to assets_handler
Move compute_file_hash, compute_zip_hash, and compute_content_hash from
scan_handler.py to filesystem/assets_handler.py as standalone module-level
functions. This follows the existing pattern for utility functions in
filesystem handlers.
2026-02-03 20:07:18 +09:00
nendo
220d7531e7 refactor(saves): replace order_by_updated_at_desc with flexible order_by
Add order_by and order_dir parameters to get_saves() for flexible
sorting. Supports "updated_at" and "created_at" fields with "asc" or
"desc" direction (default: desc). Enables ascending order for pruning
scenarios.
2026-02-03 20:06:09 +09:00
nendo
8f44027293 refactor(devices): use Pydantic models for request payloads
Replace individual Body() parameters with DeviceCreatePayload and
DeviceUpdatePayload Pydantic models. This simplifies the function
signatures and leverages model_dump(exclude_unset=True) for cleaner
update handling.
2026-02-03 20:04:58 +09:00
nendo
a6ecfb738c feat(devices): add duplicate device registration handling
Add fingerprint-based detection for duplicate device registration with
configurable behavior via new body params:
- allow_existing: return existing device if fingerprint matches
- allow_duplicate: skip fingerprint check, always create new device
- reset_syncs: clear tracked saves when reclaiming existing device

Fingerprint matching uses mac_address (primary) or hostname+platform
(fallback). Returns 409 Conflict with device_id when duplicate detected
without flags, 200 OK for existing device, 201 Created for new.
2026-02-03 20:03:50 +09:00
Zach Clendenen
0430b53ee1 signing with gpg and trunk check 2026-02-02 23:17:04 -06:00
Zach Clendenen
3416d0f465 move batch_op to else block so postgres bypasses 2026-02-02 22:28:18 -06:00
Zach Clendenen
6d81f93cec added explicit statements for postgres including USING clause 2026-02-02 22:27:42 -06:00
Georges-Antoine Assi
577a484938 Merge branch 'master' into launchbox-handler 2026-02-02 17:12:36 -05:00
Georges-Antoine Assi
54925354cd run trunk fmt 2026-01-31 21:26:36 -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
Carey Metcalfe
becaa60bbf Add option to automatically login using OIDC 2026-01-31 02:41:11 -05:00
Georges-Antoine Assi
03ca2ae681 replace amp with ampersnad 2026-01-29 13:16:06 -05:00
Georges-Antoine Assi
58e16d9c69 [ROMM-2949] Add support for shortfile scummvm names 2026-01-29 11:12:35 -05:00
Georges-Antoine Assi
b420af7578 fix migration 2026-01-28 20:35:15 -05:00
Georges-Antoine Assi
db6d35171e run fmt 2026-01-28 20:26:24 -05: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
7c2c964c32 fix check issues 2026-01-28 16:05:19 -05:00
Georges-Antoine Assi
98ed9a9f2f changes from self-review 2026-01-28 15:48:10 -05:00
Georges-Antoine Assi
b95e99ac95 store cache in redis 2026-01-28 15:19:57 -05:00
Georges-Antoine Assi
f432847793 fixes after merge 2026-01-28 15:01:37 -05:00
Georges-Antoine Assi
2a1583e504 Merge branch 'master' into launchbox-handler 2026-01-28 15:01:01 -05:00
Georges-Antoine Assi
67efe62935 Merge branch 'master' into only-ids-param 2026-01-28 14:47:10 -05:00
Georges-Antoine Assi
5f58deb3ec set more env vars 2026-01-26 21:50:41 -05:00
Georges-Antoine Assi
958a337ce2 tweak test in migration file 2026-01-26 21:32:03 -05:00
Georges-Antoine Assi
6d9cdf55c1 [HOTFIX] Fix 0063 migration postgres 2026-01-26 21:17:48 -05:00
Georges-Antoine Assi
e50016b26b Add CHEAT to RomFile category types 2026-01-25 19:18:43 -05:00
Georges-Antoine Assi
bbab9a3b41 Merge pull request #2933 from rommapp/none-filter-support
Add NONE support for filter logic operators
2026-01-23 08:35:36 -05:00
Georges-Antoine Assi
b49522e3e8 changes from bot review 2026-01-22 15:27:18 -05:00
Georges-Antoine Assi
12c1572f50 Merge pull request #2930 from Delgan/fix-file-not-found-in-7z-archive
Fix files possibly not found in 7z archives
2026-01-22 13:51:32 -05:00
Delgan
c23ab1d97b Revert pointless size reset 2026-01-22 19:48:35 +01:00
Georges-Antoine Assi
7f5130c9b8 Add NONE support for filter logic operators 2026-01-22 13:47:55 -05:00
Georges-Antoine Assi
dcb3f24c6e run trunk check 2026-01-22 11:57:23 -05:00
Delgan
f1d68d4e0e Decompress 7z archives on the fly rather than extracting to disk
Reduce I/Os.
2026-01-22 01:02:33 +01:00
Delgan
16e802d232 Fix 7z extraction of file ending/starting with whitespace 2026-01-22 00:17:47 +01:00
Delgan
97c888e969 Update backend/utils/archive_7zip.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-21 23:32:00 +01:00
Delgan
34f656e586 Fix files possibly not found in 7z archives
Some archives have an empty "Attributes" field, i.e. `Attributes = `.

But because we the line is strip, it became `Attributes =` and the
`elif` branch was never taken, resulting with `largest_file` being
`None` after processing.
2026-01-21 23:12:45 +01:00
Gravel Freeman
732cc2a530 add support for importing metadata from a local launchbox installation 2026-01-19 13:12:27 -05:00
Georges-Antoine Assi
1602688d08 fix one more test 2026-01-19 12:48:54 -05:00