Commit Graph

344 Commits

Author SHA1 Message Date
Jamie Bond
005b2f1ed7 Add SEVEN_ZIP_TIMEOUT 2025-10-27 01:29:29 +01:00
Georges-Antoine Assi
64c2689862 changes from self review 2025-10-23 17:15:19 -04:00
Georges-Antoine Assi
ad5525c484 [ROMM-2547] Flashpoint scrape by ID 2025-10-18 22:18:42 -04:00
Georges-Antoine Assi
79f582e037 add to env template 2025-10-09 14:28:30 -04:00
Georges-Antoine Assi
14b850c3ae run trunk fmt 2025-10-09 14:27:44 -04:00
Marius Luca
1604406e2b - add a configurable ROMM_TMP_PATH environment variable for controlling where large file operations take place like 7z extraction 2025-10-09 16:50:25 +03:00
Georges-Antoine Assi
c7d3bb7d80 fixups 2025-10-05 14:56:10 -04:00
Georges-Antoine Assi
3ee14fd23f force ascii on password and email 2025-10-05 14:52:00 -04:00
Georges-Antoine Assi
ae9b01e38d update rules 2025-10-05 14:42:57 -04:00
Georges-Antoine Assi
f6d7f9d1c1 [ROMM-2509] Validate user email and username 2025-10-05 14:11:34 -04:00
Georges-Antoine Assi
0d89c15f1b generate hltb correctly 2025-09-16 10:48:26 -04:00
Georges-Antoine Assi
4ed1d82a46 add platform checks 2025-09-15 10:28:32 -04:00
Georges-Antoine Assi
3c4113f8a8 Merge branch 'master' into flashpoint-metadata-handler 2025-09-11 21:27:48 -04:00
Michael Manganiello
336b3d58c1 fix: Database JSON array utils
Fix existing JSON array util `json_array_contains_value`, and add two
new utils: `json_array_contains_any` and `json_array_contains_all`.
These utils have been tested with arrays of strings and integers, on the
following database engine versions:

- PostgreSQL: 12, 13, 14, 15, 16, 17, 18
- MySQL: 8.0, 8.4, 9.0, 9.4
- MariaDB: 10.5, 10.6, 10.11, 11.4, 11.8, 12.0
2025-09-08 21:39:46 -03:00
Michael Manganiello
e4e3928d1b misc: Apply import sorting 2025-09-04 11:17:00 -03:00
Michael Manganiello
2a0b273955 fix: Invalidate fixture cache on file change
The cache for fixture files was being set without a TTL, which meant
that updates to the fixture files were not reflected in the cache.

This change saves the MD5 hash of the fixture file in a different key,
and compares it to the current hash of the file before deciding whether
to update the cache.

Fixes #2347
2025-08-30 20:38:32 -03:00
Georges-Antoine Assi
ef2546ec08 fix base handler filename 2025-08-27 12:40:16 -04:00
Georges-Antoine Assi
bf0d864d84 Add flashpoint as a metadata handler 2025-08-27 11:04:13 -04:00
Georges-Antoine Assi
dea606ad80 Merge pull request #2261 from rommapp/hash-largest-file
Always hash the largest file in compressed multi file roms
2025-08-13 13:21:59 -05:00
Georges-Antoine Assi
4936ea5121 changes from code review 2025-08-13 14:11:33 -04:00
Georges-Antoine Assi
8fb4769776 changes from code review 2025-08-13 14:03:45 -04:00
Georges-Antoine Assi
81a04e4ab4 Always hash the largest file in compressed multi file roms 2025-08-13 13:43:07 -04:00
Michael Manganiello
80291f4be1 misc: Move cache initialization to startup script
Guarantee that cache is initialized during startup, and only once,
instead of every time a `MetadataHandler` object is instantiated.

Also, improve logic to determine `fixtures` paths.
2025-08-13 12:26:15 -03:00
Georges-Antoine Assi
d005dba90b fix a bunch of shit 2025-08-09 11:16:12 -04:00
Michael Manganiello
ba21cbc1e1 misc: Separate tests folder from backend code
Create separate `tests/` folder for all tests. This will also simplify
not copying tests code into the Docker image.
2025-08-08 12:49:13 -03:00
Georges-Antoine Assi
c47be7240b changs from bot review 2025-08-07 18:15:49 -04:00
Georges-Antoine Assi
9e37d87610 fix complex game names 2025-08-07 18:02:04 -04:00
Georges-Antoine Assi
b247a5c5bb small tweaks 2025-08-07 17:39:57 -04:00
Georges-Antoine Assi
926fe26fd9 [exp] use cli 7z to cacl hash files 2025-08-07 13:12:32 -04:00
Michael Manganiello
097818d560 misc: Replace emoji dependency with constants
The `emoji` library has been removed, in favor of using constants for
the few emojis used in the codebase. This reduces memory usage, and
avoids calling `emojize` for Python to discover where to replace emojis
in pre-defined strings.
2025-08-07 09:50:14 -03:00
Georges-Antoine Assi
9fd1adbbfb fixup icon names 2025-07-24 23:20:07 -04:00
Georges-Antoine Assi
59a2e5d5aa move away from explicit LIST use 2025-07-24 16:41:17 -04:00
Georges-Antoine Assi
1bb33be803 more work migrating slugs 2025-07-24 09:30:57 -04:00
Georges-Antoine Assi
6ad0b3f5d1 Only run slug_lower once 2025-07-21 17:29:01 -04:00
Georges-Antoine Assi
3372b754fe Group generated platforms by slug and filter by name 2025-07-21 17:22:16 -04:00
Georges-Antoine Assi
51652d5084 make all path stuff async 2025-07-18 10:53:55 -04:00
Georges-Antoine Assi
cfe848e14a load all igsb platform data into app 2025-07-13 14:59:54 -04:00
Georges-Antoine Assi
b11845242b use images for suported platforms 2025-07-09 16:10:37 -04:00
Georges-Antoine Assi
75b6ca9277 fix generating supported platforms 2025-07-09 15:57:48 -04:00
Georges-Antoine Assi
837d36375d Fix metadata issues in heasheous handler 2025-07-09 09:14:41 -04:00
Georges-Antoine Assi
e8f8f1621c complete migration to uv 2025-07-04 09:54:04 -04:00
Michael Manganiello
f96adeeaee misc: Upgrade to Python 3.13
Small changes to upgrade Python to version 3.13, and fixes based on a
`pyupgrade` run using the `--py313-plus` flag.
2025-07-03 23:37:00 -03:00
Georges-Antoine Assi
6d16ca41cc have cursor fix small bugs 2025-07-03 09:46:39 -04:00
Michael Manganiello
252722e3bc misc: Apply pyupgrade changes for Python 3.12 compatibility
Command applied:
```
find ./backend/ -type f -name "*.py" -exec pyupgrade --py312-plus {} \;
```
2025-06-29 12:27:16 -03:00
Georges-Antoine Assi
0609747c6c finish migration platforms 2025-06-16 14:13:23 -04:00
Georges-Antoine Assi
2e677decea Merge branch 'master' into romm-403 2025-06-09 17:20:17 -04:00
Michael Manganiello
fe1a9ce2a7 fix: Use aiohttp for RetroAchievements API calls
This change replaces the `httpx` client with `aiohttp` for the
RetroAchievements API service.

The main reason for this change is that `httpx` has an unavoidable log
line with `INFO` level, which includes the request full URL, containing
the user's API key.

`httpx` has had an
[open discussion](https://github.com/encode/httpx/discussions/2765)
regarding this security issue for almost two years.

The change to `aiohttp` is painless, and would allow us to migrate more
of the codebase to it in the future, to avoid leaking sensitive
information in logs.
2025-06-09 09:59:56 -03:00
Georges-Antoine Assi
7627380cee fix tests and launchbox 2025-05-23 20:01:07 -04:00
Georges-Antoine Assi
32988a8c93 fix IDs and generate platforms 2025-05-23 14:50:56 -04:00
Georges-Antoine Assi
fd705e41ce add and store fake launchbox IDs 2025-05-23 14:13:19 -04:00