Commit Graph

1461 Commits

Author SHA1 Message Date
Georges-Antoine Assi
5649ebfc03 Add bios files for doom 2024-08-30 17:20:27 -04:00
Georges-Antoine Assi
f44d1273b3 Convert string-to-bool in init 2024-08-29 10:50:01 -04:00
Georges-Antoine Assi
330755f99c [ROMM-1107] Add env variable to disable in-browser emulation 2024-08-29 10:09:37 -04:00
Georges-Antoine Assi
307d906e04 Merge branch 'master' into large-lib-performance-fixes 2024-08-28 12:00:29 -04:00
Georges-Antoine Assi
e4816911d9 Better performance for large collections 2024-08-28 11:44:31 -04:00
Georges-Antoine Assi
f6197d4993 Merge pull request #1127 from rommapp/tilfoil-titledb-field
Add titledb field to tinfoil response
2024-08-27 23:47:15 -04:00
Georges-Antoine Assi
9d40c52e0a Add titledb field to tinfoil response 2024-08-27 22:38:53 -04:00
Georges-Antoine Assi
198b77af79 Merge branch 'master' into retropie-known-bios-files 2024-08-27 18:58:00 -04:00
Georges-Antoine Assi
2acc822834 Add known bios files from retropie project 2024-08-27 16:47:24 -04:00
Georges-Antoine Assi
589482f76a Disable auth on content get + add alt pico icon 2024-08-27 11:20:06 -04:00
Georges-Antoine Assi
f00749e20c add back ms.ico + add sms to moby list 2024-08-27 10:13:58 -04:00
Georges-Antoine Assi
6c158c5b32 Merge pull request #1118 from rommapp/upload-dialog-hotfixes
Upload dialog hotfixed + clear button
2024-08-26 15:58:22 -04:00
Georges-Antoine Assi
38d5ec13a5 compile regexes 2024-08-26 13:02:50 -04:00
Georges-Antoine Assi
3e9f59c546 Upload dialog hotfixed + clear button 2024-08-26 12:58:38 -04:00
Georges-Antoine Assi
c8b8bcabc8 Replace illegal fs chars in filenames 2024-08-21 22:26:56 -04:00
Michael Manganiello
a85c84a7d4 misc: Use single SQLAlchemy engine and session maker
As recommended by SQLAlchemy [1], this change makes a single
instantiation of the database engine and session maker, instead of one
entity per handler.

It also uses the provided `URL` constructor to better define the
database URL structure.

[1] https://docs.sqlalchemy.org/en/20/core/connections.html#basic-usage
2024-08-21 09:56:28 -03:00
Michael Manganiello
0fad8ac282 feat: Use nginx mod_zip to generate multi-file zip downloads
This change installs and configures the `mod_zip` nginx module [1],
which allows nginx to stream ZIP files directly.

It includes a workaround needed to correctly calculate CRC-32 values for
included files, by including a new `server` section listening at port
8081, only used for the file requests to be upstream subrequests that
correctly trigger the CRC-32 calculation logic.

Also, to be able to provide a `m3u` file generated on the fly, we add a
`/decode` endpoint fully implemented in nginx using NJS, which receives
a `value` URL param, and decodes it using base64. The decoded value is
returned as the response.

That way, the contents of the `m3u` file is base64-encoded, and set as
part of the response, for `mod_zip` to include it in the ZIP file.

[1] https://github.com/evanmiller/mod_zip
2024-08-20 22:39:33 -03:00
Georges-Antoine Assi
49e493802f Skip compressed files if theyre invalid 2024-08-18 14:14:38 -04:00
Georges-Antoine Assi
d384195c7f fixup trunk 2024-08-17 22:47:50 -04:00
Georges-Antoine Assi
faba97da5a changes from self reivew 2024-08-17 13:20:17 -04:00
Georges-Antoine Assi
716114e394 parallel upload 2024-08-17 12:35:45 -04:00
Georges-Antoine Assi
a071c0a487 actual real upload streaming 2024-08-17 11:50:14 -04:00
Georges-Antoine Assi
2d727699f8 speed improvements 2024-08-16 23:59:58 -04:00
Georges-Antoine Assi
625bfcc71e Merge branch 'master' into upload-progress-bars 2024-08-16 21:01:56 -04:00
Georges-Antoine Assi
6c2f221b52 better progress up with speeds 2024-08-16 20:49:12 -04:00
Georges-Antoine Assi
4fb19b3b59 fix uploading dups 2024-08-16 20:11:26 -04:00
Georges-Antoine Assi
e9c09b46aa better upload progress state 2024-08-16 20:07:04 -04:00
Georges-Antoine Assi
8743b03488 add rudimentary upload progress bars 2024-08-16 18:52:28 -04:00
Michael Manganiello
4f5029f78e fix: Do not set Content-Length when X-Accel-Redirect is used 2024-08-16 09:13:51 -03:00
Georges-Antoine Assi
e8e5a878c5 Merge branch 'master' into feat/implement-x-accel-redirect 2024-08-15 23:55:02 -04:00
Georges-Antoine Assi
fed465a64d use functions directly on file response 2024-08-15 23:49:57 -04:00
Michael Manganiello
0fdbbe4625 misc: Upgrade Python to v3.12 and Alpine to v3.20
Included upgrades:
* Python: v3.12
* Alpine: v3.20 (which uses Python 3.12)
* nginx: v1.27.1
2024-08-15 20:14:32 -03:00
Georges-Antoine Assi
0eb5bbad6d add some missing headers 2024-08-15 03:58:32 +00:00
Georges-Antoine Assi
9281760975 merge gzip changes into branch 2024-08-13 00:31:48 -04:00
Michael Manganiello
d20f4ad935 feat: Use X-Accel-Redirect to improve file download speed
Instead of making FastAPI handle file download, which has serious
performance issues on big files [1], this change uses nginx's `X-Accel`
feature to delegate single-file downloads to nginx.

Partial fix for #1079, as it solves the CPU usage issue for single-file
downloads.

[1] https://github.com/fastapi/fastapi/discussions/6050
2024-08-12 20:01:00 -03:00
Georges-Antoine Assi
b3a50021b7 run quick before hash scan 2024-08-12 11:57:47 -04:00
Georges-Antoine Assi
e24a3b86bd Hotfix scans when running HASH_SCAN 2024-08-12 11:37:49 -04:00
Georges-Antoine Assi
bc08e05a19 changes from self review 2024-08-11 23:09:58 -04:00
Georges-Antoine Assi
75b856bf94 only calc hashes in certian conditions 2024-08-11 22:54:35 -04:00
Georges-Antoine Assi
ce99ce4c62 update trunk + fix tests 2024-08-11 22:43:44 -04:00
Georges-Antoine Assi
1ea1b326d3 move hashes to rom model 2024-08-11 22:38:22 -04:00
Georges-Antoine Assi
c3b754a2aa fix file meta order 2024-08-11 20:05:04 -04:00
Georges-Antoine Assi
56037070fb only calc hashes exlpicit 2024-08-11 19:36:52 -04:00
Georges-Antoine Assi
a4e162e2c1 Merge branch 'master' into calc-file-hashes-roms 2024-08-11 19:07:06 -04:00
Georges-Antoine Assi
7e086cec67 fixes from code review 2024-08-11 19:06:16 -04:00
Georges-Antoine Assi
46c2dbecc1 tweaks to sql migration 2024-08-10 23:42:12 -04:00
Georges-Antoine Assi
2af2ffe7d9 improve sql + add indexes 2024-08-10 10:14:13 -04:00
Georges-Antoine Assi
3e157eab1e Merge branch 'master' into fixup-sibling-speed 2024-08-09 22:55:52 -04:00
Georges-Antoine Assi
195b86b573 even more cleanup 2024-08-09 11:46:07 -04:00
Georges-Antoine Assi
90e0e688b7 Merge branch 'master' into calc-file-hashes-roms 2024-08-09 11:36:50 -04:00