1496 Commits

Author SHA1 Message Date
Georges-Antoine Assi
b3339c177b Run formatter on alembic files 2026-02-17 15:12:33 -05:00
Georges-Antoine Assi
6368afdb6f remove check completly 2026-02-16 15:17:03 -05:00
Georges-Antoine Assi
caa6d06646 [AIKIDO-13126609] Raise HTTP exception if device not found 2026-02-16 13:53:29 -05:00
Georges-Antoine Assi
a3c882885f fix typo 2026-02-13 11:24:15 -05:00
Georges-Antoine Assi
fe5b831afc Add Rom.ra_hash and RomFile.ra_hash fields to API 2026-02-13 11:11:02 -05:00
Georges-Antoine Assi
c1a8a059a9 Merge pull request #2986 from rommapp/romm-2899
[ROMM-2899] PKGJ feed endpoints
2026-02-10 10:43:30 -05:00
Georges-Antoine Assi
acda4bb6ce move get_rap_data out of loop 2026-02-10 09:59:29 -05:00
Georges-Antoine Assi
dc857d9649 use csv writer to build feed response 2026-02-10 09:44:59 -05:00
Georges-Antoine Assi
7231414c67 use pkgj last_modified 2026-02-10 08:56:30 -05:00
Georges-Antoine Assi
393375be7f tweaks to returned feed data 2026-02-09 23:20:04 -05:00
Georges-Antoine Assi
c6e9ce5bbd filter out non-owned collections when adding 2026-02-08 09:52:55 -05:00
Cobaltboy
5712f651d3 Formatted files 2026-02-05 19:57:39 +05:30
Cobaltboy
d3ededffd6 renamed configuration 2026-02-05 14:05:00 +05:30
Georges-Antoine Assi
7cc2097203 Merge branch 'master' into romm-2899 2026-02-04 09:52:45 -05:00
Cobaltboy
0d2ddb1b8b minor config optimization
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-04 13:41:19 +05:30
Cobaltboy
2944ad9b35 improved logging conditioning
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-04 13:40:39 +05:30
Cobaltboy
d681ca1f86 Optimise database query for auto_export
Pulls database call out of the loop

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-04 12:15:31 +05:30
Cobaltboy
8dbacfd6a5 Merge branch 'rommapp:master' into feat_auto_export_gamelist 2026-02-04 11:12:20 +05:30
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
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
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
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
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
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
67efe62935 Merge branch 'master' into only-ids-param 2026-01-28 14:47:10 -05:00
Georges-Antoine Assi
7f5130c9b8 Add NONE support for filter logic operators 2026-01-22 13:47:55 -05:00
Georges-Antoine Assi
c9879b79a8 last fix 2026-01-19 10:11:40 -05:00
Georges-Antoine Assi
e9b6fa202b tweak some db code 2026-01-19 09:47:55 -05:00
Georges-Antoine Assi
6b1eda0828 fix bot review 2026-01-18 23:35:03 -05:00
Georges-Antoine Assi
9abbcca9d4 manual fixes 2026-01-18 22:55:10 -05:00
Georges-Antoine Assi
6eb888416f final manual clenaup 2026-01-18 22:51:43 -05:00
Georges-Antoine Assi
bddb7bd9f5 manual cleanup 2026-01-18 22:27:46 -05:00
Georges-Antoine Assi
3ccc14d4a2 add endpoints for identifiers 2026-01-18 22:17:37 -05:00
Georges-Antoine Assi
54bfb3fec5 DB functions accept list of params 2026-01-18 21:26:48 -05:00
Brandon T. Kowalski
919d7c010d Potential fix for https://github.com/rommapp/romm/issues/2891 2026-01-18 16:51:23 -05:00
Georges-Antoine Assi
9b64accccc Merge pull request #2915 from BrandonKowalski/feature/collection-updated-after-query-param
Feature/collection-updated-after-query-param
2026-01-18 10:23:07 -05:00
Georges-Antoine Assi
cddb38c34b Always get rom files when ROM is newly added 2026-01-18 10:19:10 -05:00
nendo
f0b2158390 Fix datetime comparison to normalize to UTC before comparing 2026-01-18 17:56:26 +09:00
nendo
26eccf0858 Fix endpoint scopes: downloaded/track/untrack require DEVICES_WRITE 2026-01-18 17:51:33 +09: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