Commit Graph

1638 Commits

Author SHA1 Message Date
zurdi
08de3b3ddf fix: typecheck 2025-01-03 03:23:36 +00:00
zurdi
4aa2d49221 feat: fully integrated screenscrapper 2025-01-03 03:08:02 +00:00
zurdi
db4001dea0 feat: base structure for ss support 2025-01-02 10:34:10 +00:00
zurdi
0d1b932701 Merge branch 'master' into feature/screenscraper-integration 2025-01-01 17:43:20 +00:00
Zurdi
41baa0cad4 Merge pull request #1412 from rommapp/feature/1082-continue-playing
feat: continue playing home section
2025-01-01 18:37:38 +01:00
Michael Manganiello
3f4a36a5ce feat: PostgreSQL compatibility
This change introduces PostgreSQL compatibility, by implementing the
following changes:

* Use `JSONB` instead of `JSON` for PostgreSQL databases. This is
  achieved by creating a custom `CustomJSON` type that uses `JSONB` on
  PostgreSQL and `JSON` on other databases, leveraging the variant
  mechanism of SQLAlchemy.
* Add `is_postgresql` function to check if the current database is
  PostgreSQL. Commonly used for migrations, but can be used to determine
  how to build queries based on the database engine.
* Add `json_array_contains_value` function to check if a JSON array
  includes a specific value. This function is needed as it's
  engine-specific.

Support for PostgreSQL is on a best-effort basis, and it relies on the
community for continued support and testing. The project's main database
is MariaDB.

Closes #667.
2024-12-31 12:36:33 -03:00
zurdi
bd420acbd6 Merge remote-tracking branch 'origin/master' into feature/1082-continue-playing 2024-12-31 14:32:51 +00:00
zurdi
0de832e2e7 fix: last played at rom_user_schema_factory 2024-12-31 12:06:28 +00:00
zurdi
cd2a163180 feat: added update last played flag 2024-12-31 12:03:25 +00:00
zurdi
95662e590c Merge remote-tracking branch 'origin/master' into feature/1082-continue-playing 2024-12-30 22:28:30 +00:00
zurdi
32b1d41198 feat: last played section at home view 2024-12-30 22:28:18 +00:00
Michael Manganiello
b9b7a8ccda fix: Make migrations compatible with PostgreSQL
This change only verifies that Alembic can upgrade and downgrade through
all the current migrations. It does not verify that the application
works correctly with PostgreSQL.
2024-12-30 08:36:05 -03:00
Michael Manganiello
3cce2844b9 fix: Remove MySQL specific dialect from migrations
Avoid using SQLAlchemy's specific MySQL dialect in migrations.

This change also fixes migration `0014` downgrade logic, which was
broken.
2024-12-29 20:30:36 -03:00
Georges-Antoine Assi
4473b6e498 fix formatting and tests 2024-12-28 10:11:36 -05:00
Anthony Uk
d96f11d56f Fix preferred_username 2024-12-28 07:11:23 +01:00
Anthony Uk
920aee5095 Rework OIDC base_handler 2024-12-28 07:05:29 +01:00
Michael Manganiello
7dc7eea34d feat: Initial Sentry support
This change initializes the Sentry SDK, which enables error tracking
when the `SENTRY_DSN` environment variable is set.

Drop-in alternatives to Sentry are also supported, like GlitchTip.
2024-12-27 17:03:45 -03:00
zurdi
f6673dd707 fix: Use preferred_username for new user creation instead of email prefix 2024-12-27 15:43:37 +00:00
zurdi
ff03d8e125 refactor: Remove OIDC_CREATE_USER configuration and generate an uuid in a OIDC created user password 2024-12-27 14:49:23 +00:00
zurdi
1083dc6e65 Merge remote-tracking branch 'origin/master' into feature/screenscraper-integration 2024-12-27 14:21:41 +00:00
Michael Manganiello
d457ce077e Merge pull request #1396 from rommapp/fix/mysql-support
fix: MySQL migration and driver support
2024-12-27 11:05:55 -03:00
zurdi
ffbebc2f46 fix: Rename CREATE_OIDC_USER to OIDC_CREATE_USER for consistency 2024-12-27 12:32:49 +00:00
zurdi
e52ebcbc5a feat: Add CREATE_OIDC_USER configuration to enable automatic user creation 2024-12-27 12:04:49 +00:00
Michael Manganiello
a0bd575019 fix: MySQL migration and driver support
Trying to run MySQL as database (instead of MariaDB) was failing due to
incompatible migrations and lack of support for the MySQL driver.

These small changes fix the issue and recover the support for MySQL as
database driver.

Support for MySQL is on a best-effort basis, as the project's main
database is MariaDB.
2024-12-27 00:29:28 -03:00
zurdi
374d11b755 Merge remote-tracking branch 'origin/master' into feature/screenscraper-integration 2024-12-26 21:06:35 +00:00
Zurdi
90890d5387 Merge pull request #1383 from rommapp/feat/platforms-custom-name
feat: added custom name for platforms
2024-12-26 22:02:19 +01:00
zurdi
980cb3169a feat: add platform_custom_name and platform_display_name to ROM schemas and update related components 2024-12-25 19:57:43 +00:00
Michael Manganiello
e38819b916 misc: Use immutable types for constants 2024-12-25 15:49:18 -03:00
zurdi
b4aa71c1b4 refactor: update PlatformSchema to use display_name and improve type definitions 2024-12-25 11:57:14 +00:00
Georges-Antoine Assi
6c238a8955 use pydantic resolver to set name field on platform 2024-12-24 10:24:20 -05:00
zurdi
9645fab707 feat: Added custom name for platforms 2024-12-24 02:30:27 +00:00
Georges-Antoine Assi
dbb3b6083b only json() once 2024-12-23 14:03:24 -05:00
zurdi
7baf1c7937 Fix typo in OIDC_PROVIDER variable name across configuration and authentication files 2024-12-23 16:02:19 +00:00
Georges-Antoine Assi
8332c7b27b fetch jwks_url from server metadata endppoint 2024-12-23 09:34:38 -05:00
Georges-Antoine Assi
c3f50d1f12 Add oidc provider name and icon to login page 2024-12-23 09:28:00 -05:00
Georges-Antoine Assi
6e912054ac Expand list of non-hashable platforms 2024-12-22 21:39:06 -05:00
Georges-Antoine Assi
37db255328 refactor oidc handler and fix tests 2024-12-18 10:49:45 -05:00
Georges-Antoine Assi
1a9735645e Merge branch 'master' into openid-connect 2024-12-18 00:17:40 -05:00
Michael Manganiello
3eb9d902d6 misc: Remove print leftover in CallbackIO class 2024-12-16 22:50:28 -03:00
Michael Manganiello
099f6e6fe2 misc: Remove unneeded Redis key for Twitch token expiration
The key `romm:twitch_token_expires_at` is not needed, as we already
set an expiration time for the token key itself. If the token is still
present in Redis, it is valid. If not, it means we either never fetched
it, or it was too close to expiration.

With this change, fetching the Twitch token makes a single Redis call
instead of two.
2024-12-13 14:33:56 -03:00
Michael Manganiello
f78611e8bb Merge pull request #1359 from rommapp/misc/sort-roms-at-handler
misc: Sort roms in get_roms method
2024-12-13 14:29:01 -03:00
Georges-Antoine Assi
34d49e6494 changes from self review 2024-12-13 11:33:39 -05:00
Georges-Antoine Assi
1ca4d894dd Merge branch 'master' into openid-connect 2024-12-13 11:24:04 -05:00
Michael Manganiello
bcaecbd311 misc: Sort roms in get_roms method
The `get_roms` method is used during scanning and to generate feeds.
Sorting by filename is not perfect (e.g. prefixes like "The" or "A"),
but should be good enough for users to better visualize how the scanning
process is going, and how close it's to finish.
2024-12-13 10:01:49 -03:00
Michael Manganiello
09c32f2376 misc: Use async cache in IGDB handler
One of the only places we are still using the sync cache, can be easily
changed to use the async one.
2024-12-13 09:21:47 -03:00
Georges-Antoine Assi
2d5bc34e9c add tests for oidc handler 2024-12-12 17:37:30 -05:00
Georges-Antoine Assi
776d3c6547 fix user endpoint tests 2024-12-12 16:17:54 -05:00
Georges-Antoine Assi
fa1eceed7a [HOTFIX] Lower permission on update user endpoint and check perms internally 2024-12-12 10:47:27 -05:00
Georges-Antoine Assi
e953398cab add email to user create 2024-12-12 10:43:45 -05:00
Georges-Antoine Assi
82ac766c9e oidc login using email 2024-12-12 10:08:27 -05:00