Commit Graph

3538 Commits

Author SHA1 Message Date
Georges-Antoine Assi
bae0d0c698 more changes from rview 2026-04-03 11:29:55 -04:00
Georges-Antoine Assi
ceddf2f9e9 changes from bot review 2026-04-03 11:24:02 -04:00
Georges-Antoine Assi
ec8583016b mega ton of fixes for 4.8 2026-04-03 10:54:31 -04:00
Georges-Antoine Assi
0e2c0c61f5 Merge pull request #3189 from dafal/feat/outbound-http-proxy
Add outbound HTTP proxy support for backend requests
2026-04-02 10:27:53 -04:00
Georges-Antoine Assi
4a8c3423df run trunk fmt 2026-04-02 10:21:43 -04:00
Eric Daras
9d659bf00b move proxy env handling into config 2026-04-02 06:23:53 +02:00
Georges-Antoine Assi
9cbd2f4cbc Merge pull request #3191 from Abdess/fix/plus3-rom-hashes
fix: correct ZX Spectrum +3 ROM hashes in known_bios_files.json
2026-04-01 20:48:28 -04:00
Georges-Antoine Assi
ac5fdb188a Merge pull request #3158 from cciollaro/fix/stats-lazy-platform-breakdown
make loading per-platform stats opt-in so homepage doesn't fetch them
2026-04-01 20:22:41 -04:00
Georges-Antoine Assi
0ab433b6f0 run trunk fmt 2026-04-01 19:27:34 -04:00
Vargash
2b17da0c6c fix: manage the new export.gamelist.media configs via _update_config_file 2026-03-31 15:29:23 +02:00
Vargash
9f877ab402 fix: align migration name and revision ID 2026-03-31 15:10:15 +02:00
Vargash
11827d1700 fix: retrieve config from get_config() 2026-03-31 15:08:19 +02:00
Vargash
f4c965be33 feat: add new export.gamelist.media.image configuration
also fix broken title_screen/miximage/physical key name usage
2026-03-31 11:16:40 +02:00
Vargash
ec30b18bba feat: add bezel tag to gamelist export 2026-03-31 11:04:13 +02:00
Vargash
3e072873e1 feat: new export.gamelist.media.thumbnail configuration 2026-03-31 11:00:49 +02:00
Vargash
0b8dffa99d feat: add family and players tags to gamelist export 2026-03-31 10:31:46 +02:00
Vargash
65689ce98c fix: correct metadata DB view so that empty JSON arrays do not win COALESCE over populated ones 2026-03-31 10:31:22 +02:00
Vargash
e4ef3b710c fix: correctly normalize average rating metadatum from 0-100 to 0-1 2026-03-31 09:56:11 +02:00
Abdessamad Derraz
6aa543c3ff fix: correct ZX Spectrum +3 ROM hashes 2026-03-27 16:43:06 +01:00
Eric Daras
8540514b46 add outbound HTTP proxy support for backend requests 2026-03-27 07:02:14 +01:00
Zurdi
4f8232e6ae Merge pull request #3171 from tmgast/fix/mod-zip-utf8
Fix mod_zip UTF-8 filename handling for non-ASCII downloads
2026-03-26 15:59:10 +01:00
nendo
e21ea088ed Revert double-encoding in ZipResponse Content-Disposition 2026-03-25 06:51:24 +09:00
nendo
2bad483a84 Fix mod_zip UTF-8 filename handling for non-ASCII downloads
Add X-Archive-Charset: UTF-8 header so mod_zip sets the EFS flag on ZIP
entries, ensuring extractors interpret filenames as UTF-8 instead of
CP437. Also URL-encode the Content-Disposition filename to match
FileRedirectResponse behavior.
2026-03-25 06:26:59 +09:00
Georges-Antoine Assi
a3ebe16a39 run fmt 2026-03-24 15:32:48 -04:00
copilot-swe-agent[bot]
a5954590ec Fix IntegrityError when updating favourites with stale ROM IDs
Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/8a6fd3fe-77ab-4f7b-a0e9-1c55e7096e88
2026-03-23 22:19:06 +00:00
Georges-Antoine Assi
2f695dd4d0 mini fix 2026-03-23 16:43:24 -04:00
cc
ce85a26185 fix: skip expensive platform stats on homepage
The /stats endpoint is called on both the homepage and the server stats
page, but only the stats page displays metadata coverage and region
breakdown. Add an `include_platform_stats` query param (default false)
so the homepage avoids the expensive per-platform queries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 17:59:07 -04:00
Georges-Antoine Assi
3ffb11fb84 fix tests 2026-03-22 17:43:16 -04:00
Georges-Antoine Assi
f107dc2752 changes from bot rview 2026-03-22 17:17:14 -04:00
Georges-Antoine Assi
4c97eddfc3 fix trunk check 2026-03-22 16:30:14 -04:00
Georges-Antoine Assi
6c88333efa cleanup 2026-03-22 09:50:10 -04:00
nendo
719b98faaf Batch session inserts into single transaction
Replace per-item add_session with add_sessions using add_all.
No fallback on IntegrityError -- duplicate concurrent submissions
are the client's responsibility.
2026-03-22 21:21:27 +09: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
d13e7b6783 fix tests again 2026-03-22 00:03:29 -04:00
Georges-Antoine Assi
51a4b4d473 fix tests 2026-03-21 23:52:41 -04:00
Georges-Antoine Assi
5bf3a435ee moer fixes 2026-03-21 22:57:44 -04:00
Georges-Antoine Assi
8e8baef6f6 fix check 2026-03-21 22:52:23 -04:00
Georges-Antoine Assi
26affaaf36 cleanup 2026-03-21 22:46:05 -04:00
Georges-Antoine Assi
4536deff65 more twekas 2026-03-21 22:30:10 -04:00
Georges-Antoine Assi
49a73e8944 export media to assets folder 2026-03-21 21:55:11 -04:00
Georges-Antoine Assi
7f7f7eb752 fix down migration 2026-03-21 21:25:20 -04:00
Georges-Antoine Assi
770b8f94ac feat: add Pegasus Frontend metadata export support
Add metadata.pegasus.txt export alongside the existing gamelist.xml
export. Restructure the export system: rename the gamelist endpoint to
a general-purpose export endpoint (`/api/export/`) with sub-routes for
each format (`/gamelist-xml`, `/pegasus`). Move config from flat
`scan.export_gamelist` to nested `scan.export.gamelist_xml` and
`scan.export.pegasus` for auto-export on scan.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 16:09:20 -04:00
zurdi
f1729b15ab fix: update mock_proc.wait return value to 0 for successful hash calculations 2026-03-20 13:33:31 +00:00
zurdi
56bc8c58dd feat: update RAHasher to version 1.8.3 and add Wii platform support 2026-03-20 13:24:19 +00:00
nendo
933dcf0443 fix: reuse enum variable in create_table to prevent duplicate type on PostgreSQL
The sa.Enum() inline in create_table tried to CREATE TYPE again after
the explicit ENUM.create() call. Use the pre-created enum variable
with create_type=False for PostgreSQL to avoid DuplicateObject error.

Verified locally: upgrade, downgrade, re-upgrade all clean on PostgreSQL.
2026-03-16 11:55:12 +09:00
nendo
269d492e62 fix: use checkfirst=True for PostgreSQL enum creation in migration
The syncsessionstatus enum creation used checkfirst=False which fails
with DuplicateObject if the type already exists (e.g., test reruns or
partial migrations). Matches the pattern used in the downgrade.
2026-03-16 11:49:05 +09:00
nendo
c59ea7790c test: add coverage for sync session handler, sync watcher, device masking, and auth utils
- test_sync_sessions_handler: increment_operations_completed (atomic
  counter, no-op on missing), NoResultFound on update/complete/fail
  with nonexistent session
- test_sync_watcher: _extract_device_and_platform path parsing (valid,
  non-incoming, too few parts, nested, outside base), _ensure_conflicts_dir
  creation and idempotency, process_sync_changes empty/disabled
- test_sync (endpoints): negotiate with untracked saves (no_op),
  server saves not mentioned by client (download), deleted-by-client
  detection (skip), complete on FAILED/CANCELLED session (400),
  trigger_push_pull passes session_id in enqueue kwargs
- test_device (endpoints): sync_config SSH credential masking
  (ssh_password/ssh_key_path -> "********"), null config passthrough,
  config without sensitive fields
- test_utils_auth: _get_device_name UA parsing (browser+OS, browser
  only, OS only, neither), create_or_find_web_device (creates new,
  returns existing on fingerprint match, updates last_seen)
2026-03-16 11:19:30 +09:00
nendo
4edb1710a5 fix: address review feedback on session handler and counter
- Restore NoResultFound behavior on update_session, complete_session,
  fail_session when row is missing (scalar returns None, old .one()
  raised -- silent None is a semantic regression)
- Remove redundant get_session call from _increment_session_counter;
  the atomic SQL increment is already a no-op on missing rows
- Log warning when passed session_id is not found in _sync_device
  instead of silently creating an orphan session
2026-03-16 10:59:49 +09:00
nendo
55638d15dc fix: address bugs, security issues, and convention violations in save-sync
- Fix broken path construction in FSSyncHandler: build_* methods now
  return relative paths; sync_watcher uses paths relative to sync base
  instead of CWD (was completely non-functional in production)
- Fix SSH connection leak in push-pull task: conn.close() now in finally
- Add log.warning for disabled SSH host key verification
- Fix race condition in session operation counter: use atomic SQL
  increment instead of read-then-write
- Extract _increment_session_counter helper, add exc_info to warnings
- Replace legacy session.query() with select() in sync_sessions_handler
- Fix orphaned session: trigger_push_pull now passes session_id to job
- Fix wasteful SSH download when no matched_save exists
- Fix BaseModel import collision in sync.py (pydantic -> project base)
- Fix ORM mutation in UserSchema.from_orm_with_request: set field on
  schema instance instead of mutating live ORM object
- Mask ssh_password and ssh_key_path in DeviceSchema API response
- Fix migration PostgreSQL compatibility: condition ON UPDATE clause
  on MySQL, drop enum in downgrade
- Rename copy-paste artifact rom_user_status_enum
2026-03-16 10:56:43 +09:00
Georges-Antoine Assi
c61f52ebed clean create web device 2026-03-15 20:25:38 -04:00