Commit Graph

4404 Commits

Author SHA1 Message Date
Michael Manganiello
b81fbc5820 fix: Improve handling of Redis URL
This change replaces the creation of Redis URL, from a simple string
interpolation, to using `yarl.URL`. The main benefit, besides not
forgetting to set all five different variables on every Redis client
initialization, is that user credentials are correctly URL-encoded, if
present.

Up until now, if a password had special characters, it could break the
generated URL.

This change also introduces support for a `REDIS_SSL` setting, which
allows the user to specify if the Redis connection should use SSL or not.
2024-10-11 21:41:19 -03:00
Michael Manganiello
36c77d51c8 Merge pull request #1227 from rommapp/fix/do-not-explicitly-set-rufflers-renderer
fix: Do not set Ruffle's renderer explicitly
2024-10-06 21:13:31 -03:00
Michael Manganiello
abf9dcc566 fix: Do not set Ruffle's renderer explicitly
According to Ruffle documentation [1], the `preferredRenderer` option is
only needed if a renderer needs to be enforced. When not provided:

> By default, Ruffle chooses the most featureful backend supported by the
> user's system, falling back to more basic backends if necessary.

This commit removes the `preferredRenderer` option from the Ruffle
configuration in the frontend, so that the default behavior is used.

It also removes the noisy `logLevel` option, which was set to `debug`.

Fixes rendering issue for `Boxhead: The Rooms`, reported in #1216.

[1] https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle
2024-10-06 20:59:30 -03:00
Michael Manganiello
05dc67c296 Merge pull request #1226 from rommapp/fix/improve-memory-usage-7z-decompression
fix: Improve memory usage during 7zip decompression
2024-10-06 20:36:24 -03:00
Michael Manganiello
149098fb31 fix: Improve memory usage during 7zip decompression
This change improves memory usage, by only keeping a single archive's
member file in memory at a time during 7zip decompression.

The `py7zr` library does not support streaming decompression yet, so
this change is the best we can do for now.

Potential fix for #1211, but it won't improve memory usage for
single-file 7zip archives.
2024-10-06 20:18:49 -03:00
Michael Manganiello
0b62fe21aa Merge pull request #1224 from rommapp/fix/escape-download-urls-when-serving-nginx
fix: Escape URLs when files are served by nginx
2024-10-06 16:07:22 -03:00
Michael Manganiello
60ff832663 fix: Escape URLs when files are served by nginx
When serving files using the `X-Accel-Redirect` header in nginx, the
header values must be URL-encoded. Otherwise, nginx will not be able
to serve the files if they contain special characters.

This commit adds a new `FileRedirectResponse` class to the `utils.nginx`
module, to simplify the creation of responses that serve files using the
`X-Accel-Redirect` header.

Fixes #1212, #1223.
2024-10-06 13:29:42 -03:00
Michael Manganiello
cf3932f14a Merge pull request #1206 from rommapp/feat/add-rahasher
feat: Add RAHasher and util to calculate RetroAchievements hashes
2024-09-23 08:09:03 -03:00
Michael Manganiello
a82489a9c4 feat: Add RAHasher and util to calculate RetroAchievements hashes
Build and include the `RAHasher` binary in the Docker image, to
calculate hashes for RetroAchievements. Also, add a service to
run `RAHasher` from Python.

Example usage:

```python
from adapters.services.rahasher import RAHasherError, RAHasherService

rahasher = RAHasherService()
try:
    hash = await rahasher.calculate_hash("nes", Path("path/to/rom.nes"))
except RAHasherError:
    # Handle error
    hash = None
```
2024-09-22 23:40:25 -03:00
Michael Manganiello
405a0879ff Merge pull request #1205 from rommapp/misc/use-bundled-valkey-instead-of-redis
misc: Use bundled Valkey instead of Redis server
2024-09-22 14:25:31 -03:00
Michael Manganiello
66e5939b2b misc: Use bundled Valkey instead of Redis server
This change replaces the bundled Redis server with Valkey. No breaking
changes are introduced, as considered environment variables still
maintain the `REDIS_` prefix.

Fixes #925.
2024-09-22 13:27:18 -03:00
Georges-Antoine Assi
8a13611d47 Merge pull request #1119 from rommapp/romm-1114
[ROMM-1114] Fetch and use age ratings in UI and filters
2024-09-21 12:53:33 -04:00
Georges-Antoine Assi
8bf3ff6a3d run formatter 2024-09-21 12:41:37 -04:00
Georges-Antoine Assi
6880d11a73 Merge branch 'master' into romm-1114 2024-09-21 12:30:39 -04:00
Georges-Antoine Assi
6cb332efcf changes from reciew 2024-09-21 12:23:23 -04:00
Georges-Antoine Assi
bca5520ecb Merge pull request #1201 from rommapp/rom-upload-proxy-buffering
Bypass nginx proxy buffering when uploading roms
2024-09-21 12:22:35 -04:00
Georges-Antoine Assi
e20465f268 increase timeout to 6 minutes 2024-09-21 11:17:28 -04:00
Georges-Antoine Assi
b85b001c3b fix socket updates on scan 2024-09-21 11:15:32 -04:00
Georges-Antoine Assi
d2ab0f4b16 Try to fix nginx proxy buffering on upload 2024-09-21 10:47:24 -04:00
Georges-Antoine Assi
fc6455eccb Merge pull request #1137 from rommapp/romm-829
[ROMM-829] Status fields on rom user
2024-09-09 19:41:38 -04:00
Georges-Antoine Assi
0b2a822e98 remove timezone from config init 2024-09-09 11:22:32 -04:00
Georges-Antoine Assi
97496d1171 Merge pull request #1184 from rommapp/romm-1176
[ROMM-1176] Fetch video ID and place in carousel
2024-09-09 10:12:46 -04:00
Georges-Antoine Assi
8fc25cde99 use timezone aware datetimes 2024-09-09 10:11:46 -04:00
Georges-Antoine Assi
fc85fcb6a9 fix pytests 2024-09-09 00:01:37 -04:00
Georges-Antoine Assi
00811be4f1 use model to keep steps in sync 2024-09-08 23:55:17 -04:00
Georges-Antoine Assi
2765a6e2c3 [ROMM-1176] Fetch video ID and place in carousel 2024-09-08 23:47:25 -04:00
Georges-Antoine Assi
515b352554 Merge pull request #1183 from rommapp/romm-1181
[ROMM-1181] Skip hashing games on desktop platorms
2024-09-08 23:44:19 -04:00
Georges-Antoine Assi
4a664ab790 [ROMM-1181] Skip hashing games on desktop platorms 2024-09-08 23:08:50 -04:00
Georges-Antoine Assi
4bdcc63d9b add working filter for hidden roms 2024-09-08 16:35:06 -04:00
Georges-Antoine Assi
d5dfb71b60 actually hide games 2024-09-08 16:20:27 -04:00
Georges-Antoine Assi
e1e2134863 refactor filters and centralize under utils 2024-09-08 15:56:05 -04:00
Georges-Antoine Assi
9086fa5f94 fix a bunch o types 2024-09-08 15:46:32 -04:00
Georges-Antoine Assi
750f440069 run generate 2024-09-08 15:25:38 -04:00
Georges-Antoine Assi
0d80bd7c51 working sidebar filters 2024-09-08 14:52:40 -04:00
Georges-Antoine Assi
8dae0a503c add simple emojis to cards 2024-09-08 13:59:10 -04:00
Michael Manganiello
bef54f5375 Merge pull request #1177 from rommapp/fix/use-filename-when-matching-unmatched-rom
fix: Use filename without tags or extension when matching unmatched game
2024-09-06 10:25:38 -03:00
Georges-Antoine Assi
d2d9f1df08 small code styling 2024-09-06 09:12:49 -04:00
Michael Manganiello
680943eff5 fix: Use filename without tags or extension when matching unmatched game
If a game is manually unmatched, we update its `name` field to
`file_name` (which includes both tags and extension). After that, if we
go to the Rom list, and click on "Manual match" for that rom, the search
field is populated with that Rom name, which commonly won't retrieve any
results from the metadata providers.

This change makes the "Manual match" search term to use the filename
without tags or extension, when the Rom is currently not matched. It
also triggers the search automatically when a search term was set.

Potential fix for #1167.
2024-09-06 09:14:18 -03:00
Michael Manganiello
b65345c205 Merge pull request #1174 from rommapp/fix/cover-update-and-delete
fix: Correctly update state for cover deletion
2024-09-05 22:57:04 -03:00
Michael Manganiello
0e98183988 fix: Correctly update state for cover deletion
* Initialize `removeCover` as `false` on each dialog render, so previous
  overrides don't affect the initial state.
* Make both file upload and cover online search update `removeCover` to
  false.
* Fix collection update to send `remove_cover` to the API.

Potential fix for #1169.
2024-09-05 14:39:28 -03:00
Georges-Antoine Assi
3094d46484 Merge pull request #1166 from rommapp/romm-1165
[ROMM-1165] set docs and recod paths
2024-09-04 19:11:56 -04:00
Georges-Antoine Assi
67e4378e60 Merge pull request #1159 from rommapp/romm-1153
[ROMM-1153] Use generated pack of favicons
2024-09-04 12:33:16 -04:00
Georges-Antoine Assi
4dcf3ba784 Merge pull request #1164 from rommapp/dependabot/pip/cryptography-43.0.1
build(deps): bump cryptography from 42.0.8 to 43.0.1
2024-09-03 23:06:27 -04:00
Georges-Antoine Assi
deae0b9f74 set docs and recod paths 2024-09-03 21:59:30 -04:00
dependabot[bot]
6211ad1690 build(deps): bump cryptography from 42.0.8 to 43.0.1
Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.8 to 43.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/42.0.8...43.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 00:32:15 +00:00
Georges-Antoine Assi
17c233ec6b fix trunk 2024-09-03 19:27:54 -04:00
Georges-Antoine Assi
e432bc32ac Merge branch 'master' into romm-1114 2024-09-03 19:13:33 -04:00
Georges-Antoine Assi
9b6b19eb27 Merge branch 'master' into romm-829 2024-09-03 18:58:06 -04:00
Georges-Antoine Assi
1ffe63aad6 Merge pull request #1161 from rommapp/rm-unraid-template
Remove unraid template
2024-09-03 08:14:16 -04:00
Georges-Antoine Assi
33bdb0fb4c Remove unraid template 2024-09-02 23:08:16 -04:00