Commit Graph

4495 Commits

Author SHA1 Message Date
zurdi
faea201628 improved api requests of gallery and details based on stores 2024-11-29 00:01:11 +00:00
zurdi
a4867252d9 removed unnecessary platforms api call from gallery and details view and simplified gallery logic based on stores 2024-11-28 17:28:08 +00:00
zurdi
2c85a6446a removed unnecessary current user api call 2024-11-28 16:35:47 +00:00
zurdi
2bed0a8b23 removed unnecessary config variables from config endpoint 2024-11-28 16:34:00 +00:00
zurdi
c661a98347 removed unnecessary structure path value to the front 2024-11-28 16:24:44 +00:00
zurdi
6a7433e1f9 removed unnecessary video endpoint request 2024-11-28 16:12:05 +00:00
zurdi
cb5d2438d2 Merge remote-tracking branch 'origin/master' into feature/add-platform-info 2024-11-28 15:23:32 +00:00
zurdi
a29a14aefb normalized covers and logos 2024-11-28 15:23:20 +00:00
Zurdi
96e5e300ec Merge pull request #1320 from rommapp/feature/add-offline-support
Added offline support and configurable logging level
3.6.0
2024-11-28 16:18:41 +01:00
zurdi
be87d92cf7 fixed platform info migration and models 2024-11-28 12:28:29 +00:00
zurdi
06e524f650 Merge branch 'master' into feature/add-platform-info 2024-11-27 22:51:16 +00:00
zurdi
213e62b31b added mask to mobygames api 2024-11-27 17:29:10 +00:00
zurdi
9bdea91a92 added LOGLEVEL to pytest conf 2024-11-27 17:20:06 +00:00
zurdi
a51dd03e1a Added full offline support and configurable logging level and API requests debug logs 2024-11-27 17:12:13 +00:00
zurdi
81507fa93c added platform info drawer 2024-11-27 11:43:21 +00:00
zurdi
80b7cc7333 added basic platform info from the igdb api call 2024-11-27 11:43:06 +00:00
Michael Manganiello
96a0ba59d5 Merge pull request #1310 from rommapp/misc/more-igdb-typehints
misc: Add more IGDB typehints
2024-11-19 07:48:58 -03:00
Georges-Antoine Assi
98bdd725dc Merge pull request #1308 from rommapp/readme-discord-bot-donate
Add discord bot + donate btn to readme
2024-11-19 00:01:52 -05:00
Michael Manganiello
d62a8b4f8b misc: Add more IGDB typehints
Add more typehints for IGDB entities, including `GameTimeToBeat`.
2024-11-18 17:51:40 -03:00
Georges-Antoine Assi
69000583b6 Add discord bot + donate btn to readme 2024-11-17 19:07:30 -05:00
Georges-Antoine Assi
8f9eb01d6c Merge pull request #1303 from rommapp/romm-1218
[ROMM-1218] Exempt the right path from CSRF protection for tokens
2024-11-17 15:36:41 -05:00
Georges-Antoine Assi
f5941ec332 [ROMM-1218] Exempt the right path from CSRF protection for tokens 2024-11-17 13:42:48 -05:00
Michael Manganiello
4ecbac73b3 Merge pull request #1300 from rommapp/fix/igdb-game-search-categories
fix: Consider more categories when matching IGDB games
2024-11-17 01:46:23 -03:00
Michael Manganiello
9c2036c9eb Merge pull request #1301 from rommapp/fix/igdb-game-exact-match-alternative-names
fix: Consider IGDB alternative names when checking for exact match
2024-11-17 01:46:14 -03:00
Michael Manganiello
71ac92bfb6 fix: Consider IGDB alternatives when checking for exact match
IGDB provides alternative names for games, which we are currently not
considering when checking for an exact match.

This change starts considering alternative names, in addition to the
game's name and slug, when checking for an exact match.
2024-11-16 20:58:20 -03:00
Michael Manganiello
deaac348da fix: Consider more categories when matching IGDB games
This change includes more categories when matching IGDB games. While
testing, some games were incorrectly matched to the wrong game, and the
reason was that the game was a Port (e.g. `Arkanoid`, `Contra`,
`Double Dragon`, `Metal Gear` for NES), a Remake (e.g.
`Adventure Island` for NES), or a Remaster.
2024-11-16 20:44:41 -03:00
Georges-Antoine Assi
dcd240ae34 Merge pull request #1296 from rommapp/romm-1292
[ROMM-1292] Log when db entries are purged
2024-11-16 14:26:49 -05:00
Georges-Antoine Assi
85443ae2d7 include the bullet in the first item 2024-11-16 14:17:32 -05:00
Georges-Antoine Assi
d01fe88db5 [ROMM-1292] Log when db entries are purged 2024-11-16 12:48:13 -05:00
Michael Manganiello
a57d5b3d2d Merge pull request #1278 from rommapp/misc/add-mariadb-healthcheck-recommendation
misc: Add MariaDB healthcheck recommendation to Docker Compose config
2024-11-15 08:14:51 -03:00
Michael Manganiello
0478fd8465 Merge pull request #1282 from rommapp/feat/add-streaming-support-for-7zip-hashing
feat: Add streaming support for 7zip hashing
2024-11-15 00:13:26 -03:00
Zurdi
ec3855bf0c Merge pull request #1287 from MattTW/master
Fix #1283 - properly default groupRoms if it doesn't exist in localStorage
2024-11-11 17:30:50 +01:00
Matt Weinecke
4ec4dcc738 Fix #1283 - properly default groupRoms if it doesn't exist in localStorage 2024-11-11 07:59:53 -08:00
Michael Manganiello
477d9b1744 feat: Add streaming support for 7zip hashing
At the moment, 7zip files are generating memory issues and even OOM
errors on user installations. This is because the current stable release
of `py7zr` does not support decompression streaming, and RomM needs to
decompress the each 7zip file in the library into memory to be able to
calculate hashes.

This change introduces a `py7zr` fork I created to have a stable commit
SHA to refer to in case upstream gets any forced pushes. It includes the
contents of the pull request the `py7zr` creator is working on to
support decompression streaming [1].

The way decompression streaming is implemented in `py7zr` is different
than the other compression utilities. Instead of being able to provide a
`bytes` iterator, we need to provide a `Py7zIO` implementation that
will call a callback on each read and write operation.

[1] https://github.com/miurahr/py7zr/pull/620
2024-11-08 21:31:11 -03:00
Michael Manganiello
7e64a02e08 misc: Add MariaDB healthcheck recommendation to Docker Compose config
This commit adds a healthcheck configuration to the MariaDB service in the
Docker Compose example configuration. The healthcheck script is a simple
shell script that checks if the MariaDB server is ready to accept connections.

The application will wait for the MariaDB service to be healthy before
starting the application service. This should solve issues where the
database takes longer to start than the application, and logs some
`Something went horribly wrong with our database` errors.

This change also stops recommending the `linuxserver/mariadb` image as
an alternative. We have had users that change the image because of the
first time run triggering those errors, but the `linuxserver/mariadb`
image requires a different configuration that could be confusing for new
users (e.g. volume mountpoint needs to be `/config` instead of
`/var/lib/mysql`).
2024-11-06 15:00:59 -03:00
Zurdi
277470b74e Merge pull request #1271 from rommapp/fix/details-personal
fix: Personal tab mobile responsive
2024-11-01 02:12:06 +01:00
Michael Manganiello
9f28c9582b Merge pull request #1272 from rommapp/misc/use-tini-as-container-entrypoint
misc: Use tini as container entrypoint
2024-10-31 21:22:08 -03:00
Michael Manganiello
26dcefa9f0 misc: Use tini as container entrypoint
Use tini [1] as the container entrypoint to ensure that the container
process is properly reaped when the container is stopped.

This is needed as the main container command is a shell script.

A simple way to test this change is to:

1. Build the container image and run it using `docker compose up`.
2. Within the same terminal, stop the container using `Ctrl+C`.
3. Verify that the container is properly stopped right away.

Without `tini`, the container takes a few seconds to stop, and it makes
one CPU core to be used at 100% during that time.

[1] https://github.com/krallin/tini
2024-10-30 09:15:02 -03:00
Michael Manganiello
009a436915 Merge pull request #1265 from rommapp/misc/initial-igdb-typehints
misc: Initial addition of IGDB typehints
2024-10-29 13:23:02 -03:00
Michael Manganiello
4f78f3b46e Merge pull request #1264 from rommapp/fix/source-image-manual-match
fix: Show source image on each result for Manual match
2024-10-29 13:22:47 -03:00
Michael Manganiello
6410b6b981 Merge pull request #1263 from rommapp/fix/download-igdb-screenshot-right-aspect-ratio
fix: Download IGDB screenshots with right aspect ratio
2024-10-29 13:22:36 -03:00
Michael Manganiello
2ff37f268d Merge pull request #1261 from rommapp/fix/broken-igdb-age-rating-image-links
fix: Broken IGDB age rating image links
2024-10-29 13:22:25 -03:00
Michael Manganiello
e79ff38ce0 Merge pull request #1260 from rommapp/fix/tar-decompression-only-consider-files
fix: Make tar decompression only consider regular files
2024-10-29 13:22:13 -03:00
zurdi
43e9365c7b fixed margin for personal tab 2024-10-29 15:40:49 +00:00
Michael Manganiello
4bb5cb5149 misc: Initial addition of IGDB typehints
The short-term goal is to completely typehint the IGDB API responses. This
first change adds the base structures and enums RomM currently uses.

The `ExpandableField` type will allow us to model the expansion
mechanism the IGDB API provides, where a field can include either an ID,
or the full nested structure.
2024-10-27 00:02:01 -03:00
Michael Manganiello
1c7880b4e2 fix: Show source image on each result for Manual match
The source image was not being shown on the results of the manual match
dialog, because scrapper image names do not match the source names. To
avoid this issue, the `MatchedSource` type was updated to include a
`logo_path` property, which will be used to set the correct image path.
2024-10-26 21:35:14 -03:00
Michael Manganiello
752096451e fix: Download IGDB screenshots with right aspect ratio
The IGDB API provides screenshots in a 1280x720 resolution, when either
`screenshot_huge` or `720p` size values are used [1]. The
`screenshot_huge` uses `Lfill`, while `720p` uses `Fit` as the resizing
method.

That means that either `screenshot_huge` or `720p` will provide the
correct aspect ratio for 16:9 platforms. However, for platforms with a
different aspect ratio, we need to use the `720p` size value to get the
correct image instead of a cropped one.

Example:
- [`screenshot_huge`](https://images.igdb.com/igdb/image/upload/t_screenshot_huge/c77bodnkwu73gs2jwhw4.jpg)
- [`720p`](https://images.igdb.com/igdb/image/upload/t_720p/c77bodnkwu73gs2jwhw4.jpg)

[1] https://api-docs.igdb.com/#images
2024-10-26 18:26:00 -03:00
Michael Manganiello
0190566530 fix: Broken IGDB age rating image links
Some of the image links for IGDB age ratings were broken. This commit
fixes all of them.
2024-10-26 01:19:57 -03:00
Michael Manganiello
8fd680ab84 fix: Make tar decompression only consider regular files
The `tar` decompression function was failing for some users, with error
message:

```
'NoneType' object does not support the context manager protocol
```

As explained in the official documentation [1], the `extractfile` method
returns `None` if the member is not a regular file or a link. This
change skips any member that is not a regular file.

[1] https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractfile
2024-10-26 01:07:27 -03:00
zurdi
c41e8ec40f fixed rom personal details on mobile 2024-10-25 16:19:53 +00:00