Commit Graph

403 Commits

Author SHA1 Message Date
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
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
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
8ed107336f only print queries once 2025-08-21 22:34:07 -04:00
Georges-Antoine Assi
593f5c921d catch playmatch connect error 2025-08-18 09:08:41 -04:00
Georges-Antoine Assi
5f4943c97b find_best_match handles split name search 2025-08-17 22:39:00 -04:00
Georges-Antoine Assi
363657d139 cleanup 2025-08-17 21:08:56 -04:00
Georges-Antoine Assi
d41a920c37 normalize split tiles for ssfr 2025-08-17 20:29:44 -04:00
Georges-Antoine Assi
f0574577c9 Prefer lower IDs when matching games with same title 2025-08-17 19:53:29 -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
Michael Manganiello
c0483832ac Merge pull request #2240 from rommapp/fix/retroachievements-case-insensitive-hash-match
fix: Make RetroAchievements hash matching case-insensitive
2025-08-09 16:13:41 -03:00
Georges-Antoine Assi
84ded3bc24 pick largest file from the list 2025-08-09 14:47:34 -04:00
Michael Manganiello
f13d2198db fix: Make RetroAchievements hash matching case-insensitive
Fixes #2182.
2025-08-09 12:48:28 -03:00
Georges-Antoine Assi
d005dba90b fix a bunch of shit 2025-08-09 11:16:12 -04:00
Georges-Antoine Assi
afaef09c84 cleanup 2025-08-08 17:08:16 -04:00
Georges-Antoine Assi
16c8c9f993 only init JW once 2025-08-08 17:03:28 -04:00
Georges-Antoine Assi
69079b2a90 Merge branch 'master' into find-best-match 2025-08-08 16:55:39 -04:00
Georges-Antoine Assi
659a3eb104 use jaro-winkler algo 2025-08-08 16:54:26 -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
1a2944806b Use best-match algo for more providers 2025-08-07 16:57:29 -04:00
Georges-Antoine Assi
f3a74bc892 changes from review 2025-08-07 11:33:02 -04:00
Georges-Antoine Assi
a90bc75b92 Merge branch 'master' into romm-2142 2025-08-07 10:34:19 -04:00
Georges-Antoine Assi
90f10e8946 Fixed platform slugs that were missed 2025-08-06 17:28:10 -04:00
Georges-Antoine Assi
53cf1bdc72 implement real lev distnce 2025-08-06 11:04:24 -04:00
Georges-Antoine Assi
eb6498da61 custom similarity implementation 2025-08-06 10:27:04 -04:00
Georges-Antoine Assi
1d797e286b custom implement mix 2025-08-06 10:21:54 -04:00
Georges-Antoine Assi
8ce943a514 use fastapi status 2025-08-02 22:17:07 -04:00
Georges-Antoine Assi
8ddc654c17 update with fixed ids 2025-07-25 15:44:49 -04:00
Georges-Antoine Assi
26e9f9e9b0 add tests for base handler 2025-07-24 21:15:18 -04:00
Georges-Antoine Assi
c2c80fbfc3 fix tests 2025-07-24 17:33:14 -04:00
Georges-Antoine Assi
1955da78f2 finish all the handlers 2025-07-24 17:05:39 -04:00
Georges-Antoine Assi
59a2e5d5aa move away from explicit LIST use 2025-07-24 16:41:17 -04:00
Georges-Antoine Assi
8a76528815 finish translating keys 2025-07-24 16:09:49 -04:00
Georges-Antoine Assi
b431aa4d7e manual fixes 2025-07-24 15:43:03 -04:00
Georges-Antoine Assi
39e6fd3579 use ups keys for all lists 2025-07-24 15:30:03 -04:00
Georges-Antoine Assi
1cc01922d9 comlpete migration and transition 2025-07-24 10:25:41 -04:00
Georges-Antoine Assi
1bb33be803 more work migrating slugs 2025-07-24 09:30:57 -04:00
Georges-Antoine Assi
973f42cd0b update watasra supervision 2025-07-23 22:20:18 -04:00
Georges-Antoine Assi
595c52bcab Unify singular slugs 2025-07-23 21:52:52 -04:00
Zurdi
c1565fc9dc Merge pull request #2135 from rommapp/feature/clean-resources-task
feat: Added clean resources task + revamped the whole task system
2025-07-22 23:15:40 +02:00
zurdi
7aeccb5468 feat: Added clean resources task + revamped the whole task system 2025-07-22 16:31:36 +00: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
f3c0e484f5 Rename adam to lowercase 2025-07-21 16:50:31 -04:00