Commit Graph

2520 Commits

Author SHA1 Message Date
Michael Manganiello
e4e3928d1b misc: Apply import sorting 2025-09-04 11:17:00 -03:00
Michael Manganiello
c66a6eb5b7 Merge pull request #2370 from rommapp/misc/metadata-handler-is-enabled
misc: Add MetadataHandler's is_enabled method
2025-09-04 09:47:42 -03:00
Georges-Antoine Assi
768624cd74 filter out existing webp files in taks 2025-09-03 21:32:33 -04:00
Georges-Antoine Assi
33b8e037b5 scan launchbox first on update 2025-09-03 21:28:05 -04: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
3e7d70ae4e can manual run convert webp task 2025-09-03 20:07:51 -04: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
Georges-Antoine Assi
bb004fce6c fix tests 2025-09-02 09:40:43 -04:00
Georges-Antoine Assi
d760a2923e change options to settings 2025-09-02 09:10:32 -04:00
Georges-Antoine Assi
949ec85266 improve parsing default controls 2025-09-02 09:07:21 -04:00
Georges-Antoine Assi
e42acbfafc add debug and controls 2025-09-02 08:38:11 -04:00
Georges-Antoine Assi
147a94c406 Load core options from config.yml 2025-09-01 21:16:37 -04:00
Michael Manganiello
568a989980 Merge pull request #2352 from rommapp/feat/task-sync-retroachievements-progress
feat: Add scheduled task to sync RetroAchievements progress
2025-08-31 16:21:46 -03: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
c92bd48d23 Merge pull request #2350 from rommapp/fix/invalidate-cache-for-fixtures
fix: Invalidate fixture cache on file change
2025-08-30 21:26:28 -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
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
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
f8d5feba24 changes from review 2025-08-30 14:19:29 -04:00
Georges-Antoine Assi
dd0f87a4d0 changes from code review 2025-08-28 12:54:20 -04:00
Georges-Antoine Assi
45edc8fcc0 use stores for loading global data 2025-08-28 09:48:52 -04:00
Georges-Antoine Assi
bf42faf578 fix loading and converting images 2025-08-27 23:31:29 -04:00
Georges-Antoine Assi
b7d59d74c4 init task 2025-08-27 22:25:45 -04:00
Georges-Antoine Assi
586ce0ef30 Craete image to webp task 2025-08-27 22:12:12 -04:00
Michael Manganiello
739aa61918 Merge pull request #2325 from rommapp/feat/retroachievements-incremental-sync
feat: Add incremental sync for RetroAchievements progression
2025-08-27 11:19:29 -03: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
e75fb13f57 add log statements on scan 2025-08-27 09:38:31 -04:00
Georges-Antoine Assi
585ad63349 use correct key for job timeout 2025-08-26 22:22:36 -04:00
Georges-Antoine Assi
2e690f49bb fix tests 2025-08-26 21:17:27 -04:00
Georges-Antoine Assi
9bb586b288 set timeouts 2025-08-26 21:09:13 -04:00
Georges-Antoine Assi
603f6ec5af Add options to gunicorn call 2025-08-26 18:16:52 -04:00
Georges-Antoine Assi
cb4b263e80 fix lint suppress 2025-08-26 08:53:30 -04:00
Georges-Antoine Assi
1d18bd627d [ROMM-2317] Fix postgres migration firmware is_verified 2025-08-26 08:52:02 -04:00
Georges-Antoine Assi
f9c2c2f916 remove unused import 2025-08-23 15:25:05 -04:00
Georges-Antoine Assi
e615f39905 grab file size from rom for paltform 2025-08-23 15:22:29 -04:00
Georges-Antoine Assi
9fe4eca302 Merge pull request #2303 from rommapp/db-query-micro-optimize
DB query micro optimizations
2025-08-22 11:38:53 -05:00
Georges-Antoine Assi
898f960c96 noload rom metadata on collection 2025-08-22 09:15:03 -04:00
zurdi
7f96a44190 Add validation for empty username/password in registration 2025-08-22 13:35:58 +02:00
Georges-Antoine Assi
896d8001ec fix migration 2025-08-22 00:02:59 -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
0daf63dfec fix migration for postgres 2025-08-20 16:33:05 -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
Georges-Antoine Assi
1c0c93bb3d select only some columns for performance 2025-08-20 11:20:02 -04:00