Commit Graph

84 Commits

Author SHA1 Message Date
zurdi
fdb795dff1 feat: add missing filter options in API and database handlers for ROMs 2025-06-12 13:41:19 +00:00
zurdi
8b0a06c3e6 feat: add 'missing' column to multiple tables and update related handlers for missing entries 2025-06-12 12:20:56 +00:00
zurdi
b52ea89115 feat: add 'missing' flag to platforms and roms, update related handlers and schemas 2025-06-12 01:20:20 +00:00
Michael Manganiello
47a7f84b9a feat: Use optional flags instead of booleans for Rom filtering
This change replaces boolean flags for filtering Roms with optional
flags. This allows clients to specify whether they want to include
or exclude certain types of Roms, such as matched, favourite,
duplicate, or playable.

The boolean flags are still supported for backwards compatibility,
but they are marked as deprecated. Clients should transition to
using the new optional flags in future versions.

The main reason for this change is to allow the exclusion of certain
results, without the need to add additional boolean flags, which are
also confusing if both its `True` and `False` values are used within
the same request.
2025-06-10 00:19:21 -03:00
zurdi
1603e61245 feat: add Retroachievements filter and related UI components 2025-05-23 01:11:00 +00:00
zurdi
96cdf4ee5f fix: hidden games on PR #1899 2025-05-22 10:48:09 +00:00
Georges-Antoine Assi
becd203801 Merge pull request #1899 from rommapp/romm-1895
[ROMM-1895] Fix hiding hidden roms in lists
2025-05-19 15:51:08 -04:00
Georges-Antoine Assi
6d590dd03f fix check isues 2025-05-19 12:28:32 -04:00
Georges-Antoine Assi
51ad1ed214 make it a bit more robust 2025-05-19 12:18:00 -04:00
Georges-Antoine Assi
e8416cfcaf [ROMM-1895] Fix hiding hidden roms in lists 2025-05-19 12:13:58 -04:00
Georges-Antoine Assi
be3718dfdd support sorting games by file size 2025-05-19 11:46:03 -04:00
zurdi
5ba5bb8543 feat: add show playables filter 2025-05-13 09:34:04 +00:00
Georges-Antoine Assi
f8aeb37347 [HOTFIX] Only lower and strip string order_by types 2025-04-24 14:33:37 -04:00
Georges-Antoine Assi
586c06ac95 fix loading games on postgres 2025-04-09 11:29:57 -04:00
Georges-Antoine Assi
edfcf3fa76 only trim and lower if attr is string 2025-03-29 11:22:58 -04:00
Georges-Antoine Assi
b91f69bed1 fix overgrouping by meta id 2025-03-24 23:42:09 -04:00
Georges-Antoine Assi
490aa4d89c filter out rows when order by columnis null 2025-03-24 19:30:19 -04:00
Georges-Antoine Assi
03e2bac425 fix ordering rows in table view 2025-03-23 19:35:53 -04:00
Georges-Antoine Assi
6367e5c795 working pagination with sside grouoiung 2025-03-23 11:41:43 -04:00
Georges-Antoine Assi
6f96ea1d9a working grouping on endpoint 2025-03-23 11:28:24 -04:00
Georges-Antoine Assi
5c2054b44b fix get by fs_rom 2025-03-22 18:06:35 -04:00
Georges-Antoine Assi
c387a0036e disable duplicate filtering when over 2500 roms in platform 2025-03-22 12:16:10 -04:00
Georges-Antoine Assi
0607323005 log SQL queries and exec time in dev mode 2025-03-22 09:49:13 -04:00
Georges-Antoine Assi
35dfedd22f working just to letter with pagination 2025-03-21 22:44:47 -04:00
Georges-Antoine Assi
05a78e03ce new method for getting non-pagniated roms 2025-03-21 10:08:44 -04:00
Georges-Antoine Assi
ca6d312c4a fix tests 2025-03-21 09:42:39 -04:00
Georges-Antoine Assi
581cdf742c fix pagination speeds 2025-03-21 00:07:27 -04:00
Georges-Antoine Assi
9543d5f9f0 Merge branch 'master' into true-pagination 2025-03-20 19:41:36 -04:00
Georges-Antoine Assi
26b6c28a29 full backend filering 2025-03-17 23:50:58 -04:00
Georges-Antoine Assi
599266b437 [wip] virtual metadata table 2025-03-17 20:39:36 -04:00
Georges-Antoine Assi
f1f627f7c5 working pagination on roms endpoint 2025-03-14 21:10:30 -04:00
Georges-Antoine Assi
af735b1fda refactor filtering to be cross platform 2025-03-12 10:27:18 -04:00
Georges-Antoine Assi
c3cb00bd8f soft m3u files on download 2025-03-02 14:22:56 -05:00
Georges-Antoine Assi
22e0c806e1 prefetch rom collections for details 2025-01-29 10:13:02 -05:00
Georges-Antoine Assi
10fbead892 autogenerate cover art 2025-01-27 20:26:33 -05:00
Georges-Antoine Assi
5dbc1aae0b display virtual collections 2025-01-27 19:14:54 -05:00
Georges-Antoine Assi
2859ac04c8 fix pyright issues 2025-01-26 10:57:27 -05:00
Georges-Antoine Assi
4b087d9dcb fix issue with duplicate filename 2025-01-17 11:28:03 -05:00
Georges-Antoine Assi
477d99a6bf first batch of review fixes 2025-01-17 11:15:54 -05:00
Georges-Antoine Assi
696a1c6122 Merge branch 'master' into rom-hashing-background-task 2025-01-15 21:51:23 -05:00
Georges-Antoine Assi
d0ba1d6e19 [HOTFIX] Fix remove from continue playing 2025-01-12 14:32:44 -05:00
Michael Manganiello
7825bce7b8 fix: Use proper JSON contains function for PostgreSQL
Fix `json_array_contains_value` function to use the `@>` operator for
checking if a JSON array contains a value in PostgreSQL. This is
necessary because the `has_key` function only works for string values.

Also, remove `get_rom_collections` method, as it was doing the same
thing as `get_collections_by_rom_id`.

Fixes #1441.
2025-01-08 21:07:01 -03: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
32b1d41198 feat: last played section at home view 2024-12-30 22:28:18 +00:00
Georges-Antoine Assi
1952f80b87 fix the rest of the tests 2024-12-22 17:00:35 -05:00
Georges-Antoine Assi
2e4e557eef fixup running scans and loading 2024-12-21 12:06:37 -05:00
Georges-Antoine Assi
de7f96b95b create rom_files during scan 2024-12-21 10:04:41 -05:00
Georges-Antoine Assi
55eee458a1 actaully complete backend 2024-12-21 00:37:37 -05:00
Michael Manganiello
0a4c81d5c1 misc: Retrieve roms by filename from database in bulk during scan
The scanning process could try to fetch thousands of roms from the
database, one by one, which is very inefficient, especially when only a
few new roms are added to the library, as the overhead of database calls
is very high compared to metadata API calls.

This change introduces a new method in the roms handler to retrieve roms
by their file names in bulk, which is used during the scan process to
fetch a batch of roms at once, instead of one by one.

It also avoids the `@with_details` decorator when fetching roms during
the scanning process, as those details are not needed, and they were
adding unnecessary joins and data decoding.
2024-12-02 00:00:47 -03:00