Commit Graph

53 Commits

Author SHA1 Message Date
Georges-Antoine Assi
76d445ccd9 [ROMM-2722] Fix matching special chars in ssfr 2025-12-07 21:21:57 -05:00
Georges-Antoine Assi
21064e03a4 cleanup log 2025-10-22 16:39:05 -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
f9f76e1d18 add rommm header to all requests 2025-09-15 11:13:33 -04:00
Georges-Antoine Assi
3c4113f8a8 Merge branch 'master' into flashpoint-metadata-handler 2025-09-11 21:27:48 -04:00
Georges-Antoine Assi
d7e85ba633 [ROMM-1333] Use metadata tag in filename to match game 2025-09-07 14:12:30 -04:00
Michael Manganiello
e4e3928d1b misc: Apply import sorting 2025-09-04 11:17:00 -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
ef2546ec08 fix base handler filename 2025-08-27 12:40:16 -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
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
8ce943a514 use fastapi status 2025-08-02 22:17:07 -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
1cc01922d9 comlpete migration and transition 2025-07-24 10:25:41 -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
Georges-Antoine Assi
98f4cd4a65 changes from core view 2025-07-23 10:35:14 -04:00
Georges-Antoine Assi
b92ecd8d13 Add tests for mobygames, sgdb and ssfr service adapter
add ssfr and sgdb service test
2025-07-23 10:15:03 -04:00
Georges-Antoine Assi
87df3e973e code review changes 2025-07-22 22:31:40 -04:00
Georges-Antoine Assi
79c1f8dae0 Merge branch 'master' into service-adapter-tests 2025-07-22 19:40:45 -04:00
Georges-Antoine Assi
0a5b2e5fa2 await res.json in ssfr inside catch block 2025-07-13 20:40:16 -04:00
Georges-Antoine Assi
3781cbdb6b catch json errors on all ends 2025-07-12 19:16:50 -04:00
Georges-Antoine Assi
53c628ae56 catch json errors in ssfr 2025-07-12 16:06:38 -04:00
Georges-Antoine Assi
70e062afb6 fix ra test again 2025-07-06 15:05:26 -04:00
Georges-Antoine Assi
5a8a6fe9ab dont run with real rahasher 2025-07-06 15:00:01 -04:00
Georges-Antoine Assi
2bf41ad454 add test for rahasher 2025-07-06 14:44:47 -04:00
Georges-Antoine Assi
77d2d85a7c Add tests for ra service 2025-07-06 13:23:19 -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
Michael Manganiello
4209ee4481 misc: Create MobyGames service adapter
Add a new service adapter for the MobyGames 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.
2025-06-27 01:15:49 -03:00
Michael Manganiello
bf9fb12f91 misc: Create SteamGridDB service adapter
Add a new service adapter for the SteamGridDB 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.
2025-06-25 09:42:32 -03:00
Michael Manganiello
da8e7fd90c misc: Create ScreenScraper service adapter
Add a new service adapter for the ScreenScraper 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.
2025-06-19 10:17:27 -03:00
Georges-Antoine Assi
56117e8105 really fix it this time 2025-06-13 22:27:36 -04:00
Georges-Antoine Assi
5e6229a59d Fix RA platform IDs for matching 2025-06-11 08:51:47 -04:00
Michael Manganiello
a44db9767a fix: Iterate through user completion progress in RetroAchievements
Iterate through all pages of user completion progress in the
RetroAchievements service, instead of limiting the data retrieval to the
first 500 results.
2025-06-09 19:19:39 -03:00
Michael Manganiello
6768e25321 Merge pull request #1956 from rommapp/fix/retroachievements-api-use-aiohttp
fix: Use aiohttp for RetroAchievements API calls
2025-06-09 14:51:10 -03:00
Georges-Antoine Assi
d18f85b943 Fix and uupdate more rahasher IDs 2025-06-09 10:18:50 -04:00
Georges-Antoine Assi
0abb41d9db Use correct ID for genesis/metadrive 2025-06-09 09:51:55 -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
Michael Manganiello
e885586edb misc: Create RetroAchievements service adapter
Add a new service adapter for the RetroAchievements 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 be handled by a specific
`httpx.Auth` class that sets the `y` parameter for each request.
2025-06-09 00:47:05 -03:00
Michael Manganiello
3f8baed220 misc: Add typing to RetroAchievements API responses
Include detailed type information for RetroAchievements API responses,
based on the official API documentation.
2025-06-07 17:56:29 -03:00
Georges-Antoine Assi
fd18d8e1c9 small tweaks from copilot comments 2025-06-06 12:12:38 -04:00
Georges-Antoine Assi
f87f403555 search for hash instead of matching 2025-06-05 23:12:55 -04:00
Georges-Antoine Assi
8c817c7f4b stop RA from crashing when not available 2025-06-05 11:44:47 -04:00
zurdi
9be404da89 fix: little fix when RAHasher fails 2025-05-14 15:34:22 +00:00
zurdi
9d7fdf10dd refactor: enhance logging setup in logger.py and improve debug output in rahasher.py 2025-05-10 22:34:51 +00:00
zurdi
6da852ae58 refactor: update RAHasherService to use platform ID and improve hash calculation logic 2025-05-10 22:16:29 +00:00
zurdi
910dea3470 feat: integrate RAHasher for retroachievement hash calculation and improve UI responsiveness 2025-05-10 21:55:12 +00:00
zurdi
53d4761547 misc: migrate IGDB API fields to new version 2025-02-18 17:10:09 +00:00