Commit Graph

1082 Commits

Author SHA1 Message Date
Georges-Antoine Assi
2481bac019 refine states 2025-09-20 19:48:52 -04:00
Georges-Antoine Assi
7a5185fe22 complete rest of handler 2025-09-20 19:38:26 -04:00
Georges-Antoine Assi
8c33a95637 remove hartbeat from bh endpoint 2025-09-20 17:57:38 -04:00
Georges-Antoine Assi
e9f7da09f9 add metadata status page and heartbeats 2025-09-20 09:19:15 -04:00
Georges-Antoine Assi
c4bd619091 fix bugs from bot review 2025-09-18 16:38:32 -04:00
Georges-Antoine Assi
fe2a7e7bff Add launchbox to manual match window 2025-09-18 16:34:40 -04:00
Georges-Antoine Assi
afc92e73ee Implement file tag matching for HLTB 2025-09-17 11:07:08 -04:00
Georges-Antoine Assi
bdd80a8527 reduce priority of hltb and ra 2025-09-17 10:53:21 -04:00
Georges-Antoine Assi
bfa7901efe fix tests 2025-09-16 18:00:07 -04:00
Georges-Antoine Assi
0d89c15f1b generate hltb correctly 2025-09-16 10:48:26 -04:00
Georges-Antoine Assi
6032792e2f changes from pr review 2025-09-16 09:11:33 -04:00
Georges-Antoine Assi
f9f76e1d18 add rommm header to all requests 2025-09-15 11:13:33 -04:00
Georges-Antoine Assi
4ed1d82a46 add platform checks 2025-09-15 10:28:32 -04:00
Georges-Antoine Assi
123b3f6b8b create makeshift howlongtobeet handler 2025-09-14 19:39:38 -04:00
Georges-Antoine Assi
debc6c4cab run formatter 2025-09-11 22:35:19 -04:00
Georges-Antoine Assi
3c4113f8a8 Merge branch 'master' into flashpoint-metadata-handler 2025-09-11 21:27:48 -04:00
Michael Manganiello
a6bdd84148 misc: Add missing language codes
This list was created based on latest DAT files from No-Intro and
Redump.org.

With all those extracted files in a folder, this command retrieved
language codes from filenames (only considering games with at least two
languages, to avoid false positives):

```shell
rg -N "^.*game name=\"(.*?)\".*" -r '$1' | \
    rg -N "^.* \(([A-Z][a-z](,[A-Z][a-z])+)\).*" -r '$1' | \
    rg -N -o "[A-Z][a-z]" | \
    sort | \
    uniq -c
```
2025-09-11 17:38:36 -03:00
Georges-Antoine Assi
4be34d8194 Merge branch 'master' into romm-1333 2025-09-09 21:08:51 -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
Georges-Antoine Assi
34b4ef99bb fix comments 2025-09-07 23:05:01 -04:00
Georges-Antoine Assi
d7e85ba633 [ROMM-1333] Use metadata tag in filename to match game 2025-09-07 14:12:30 -04:00
Georges-Antoine Assi
b1126b9bf4 [ROMM-2039] ADd special case for screenshots during scan 2025-09-06 08:37:52 -04:00
Georges-Antoine Assi
bf631cfa74 fix updating image preview + force webp 2025-09-05 09:42:25 -04:00
Georges-Antoine Assi
d1ecff395b [ROMM-2344] Ignore RA manuals on scan 2025-09-04 23:11:04 -04:00
Michael Manganiello
e4e3928d1b misc: Apply import sorting 2025-09-04 11:17:00 -03:00
Michael Manganiello
d216bad78b misc: Add MetadataHandler's is_enabled method
Convert `MetadataHandler` to an abstract base class and add an
`is_enabled` class method that allows every metadata handler to
independently report whether it is enabled based on its configuration.

This avoids the need for global variables in the config module, allowing
us to change the enabled state of a metadata handler at runtime if
needed.
2025-09-03 22:13:28 -03:00
Georges-Antoine Assi
5d2daf7357 move into a function 2025-09-03 17:51:44 -04:00
Georges-Antoine Assi
33ee8d3a20 [ROMM-2342] Fix single roms display on postgres 2025-09-03 17:06:51 -04:00
Michael Manganiello
a31a8504c2 feat: Add scheduled task to sync RetroAchievements progress
Add a new scheduled task that syncs RetroAchievements progress for all
users with a RetroAchievements username.

Environment variables:
- `ENABLE_SCHEDULED_RETROACHIEVEMENTS_PROGRESS_SYNC`: Enable or disable
  the task (default: `false`)
- `SCHEDULED_RETROACHIEVEMENTS_PROGRESS_SYNC_CRON`: Cron string to
  schedule the task (default: "0 4 * * *" - daily at 4 AM)
2025-08-31 01:57:26 -03:00
Michael Manganiello
88e5f8aceb Merge pull request #2345 from rommapp/misc/igdb-service-adapter
misc: Create IGDB service adapter
2025-08-30 21:13:10 -03:00
Michael Manganiello
b2ea84b5bb misc: Create IGDB service adapter
Add a new service adapter for the IGDB API, to separate concerns with
RomM's handler for metadata. This adapter is agnostic to the handler and
only provides methods to interact with the API, and correctly return
typed responses.

The API authorization was also improved to not rely on decorating each
method that makes requests, but instead using an `aiohttp` middleware
to automatically add the required headers to each request.

Utils `mark_expanded` and `mark_list_expanded` where added to help
narrow the types of IGDB's expandable fields when we know they are
expanded, for `mypy` type checking.
2025-08-30 20:21:15 -03:00
Georges-Antoine Assi
45edc8fcc0 use stores for loading global data 2025-08-28 09:48:52 -04:00
Georges-Antoine Assi
586ce0ef30 Craete image to webp task 2025-08-27 22:12:12 -04:00
Georges-Antoine Assi
410c65c544 add flashpoint metadata to roms_metadata 2025-08-27 16:30:03 -04:00
Georges-Antoine Assi
ef2546ec08 fix base handler filename 2025-08-27 12:40:16 -04:00
Georges-Antoine Assi
841992e9fb fix flashpoint search 2025-08-27 12:05:02 -04:00
Georges-Antoine Assi
27928bd75b fix pytests 2025-08-27 11:41:24 -04:00
Georges-Antoine Assi
ee0110699d fix id column type 2025-08-27 11:23:27 -04:00
Georges-Antoine Assi
bf0d864d84 Add flashpoint as a metadata handler 2025-08-27 11:04:13 -04:00
Michael Manganiello
9cede7680f feat: Add incremental sync for RetroAchievements progression
This change makes the RetroAchievements progression sync endpoint to
optionally perform an incremental sync (when `incremental` is true),
by only fetching new achievements since the last sync.

This reduces the amount of data fetched and speeds up the sync
process for users who frequently sync their progression. It unblocks the
implementation of automatic periodic syncs in the future.

Frontend behavior:
- When the `Apply` button is clicked in the RetroAchievements settings,
  a full sync is performed (same as before). This is because a change to
  the RA username may have occurred.
- When the `Sync` button is clicked, an incremental sync is performed.
2025-08-27 10:41:51 -03:00
Georges-Antoine Assi
603f6ec5af Add options to gunicorn call 2025-08-26 18:16:52 -04:00
Georges-Antoine Assi
898f960c96 noload rom metadata on collection 2025-08-22 09:15:03 -04:00
Georges-Antoine Assi
b26abdf9a0 noload some related tables 2025-08-21 23:59:24 -04:00
Georges-Antoine Assi
344702415f joinedload roms on collection 2025-08-21 23:23:38 -04:00
Georges-Antoine Assi
1d5cd64fb8 move is_verified to db 2025-08-21 22:58:22 -04:00
Georges-Antoine Assi
8ed107336f only print queries once 2025-08-21 22:34:07 -04:00
Georges-Antoine Assi
82f527b3ad Remove check for non extension 2025-08-20 20:48:30 -04:00
Georges-Antoine Assi
474459c9d5 move group_id coalesce into partition_by 2025-08-20 18:52:55 -04:00
Georges-Antoine Assi
f32dc3171d ignore type issue 2025-08-20 13:50:12 -04:00
Georges-Antoine Assi
e73b6cc190 add option to skip char index 2025-08-20 13:27:26 -04:00