Update Chinese (Traditional Han script) translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Update French translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: John Kindle <idp-portal.suse.com.dwindle414@aleeas.com>
Co-authored-by: Tristan B <tristanb0@users.noreply.hosted.weblate.org>
Update Italian translation
Update Italian translation
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Random <random-r@users.noreply.hosted.weblate.org>
* doc: Update HTTP proxy configuration comments
Added information about proxy configuration for YouTube streams.
* Document supported proxy types in config.example.yml
Added note about supported proxy types in configuration.
Image responses contained the following unwanted headers that should not
be passed to the clients:
```
"Cross-Origin-Resource-Policy"
["cross-origin"]
"Cross-Origin-Opener-Policy-Report-Only"
["same-origin; report-to=\"youtube\""]
"Report-To"
["{\"group\":\"youtube\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/youtube\"}]}"]
"Timing-Allow-Origin"
["*"]
```
* downgrade to 1.16.3
* Downgrade Alpine base image from 3.23 to 3.22
---------
Co-authored-by: Émilien (perso) <4016501+unixfox@users.noreply.github.com>
* Allow downloading via companion
* post request where not proxied for the download companion which made
it impossible to download with the companion enabled
* Re-apply Channel to Channels rename which was pulled in
* Update src/invidious/routes/companion.cr
* doc: better comments for each route
---------
Co-authored-by: Fijxu <fijxu@nadeko.net>
Co-authored-by: Émilien (perso) <4016501+unixfox@users.noreply.github.com>
* Replace deprecated `blocking` property of `Socket`
This replaces the deprecated argument `blocking` and uses
`Socket.set_blocking(fd, value)` instead.
Fixes a warning in the compiler
https://github.com/crystal-lang/crystal/pull/16033
* Upgrade to upstream
* chore: only Socket.set_blocking for > 1.18
---------
Co-authored-by: Emilien <4016501+unixfox@users.noreply.github.com>
Summing the sizes of each cached file every time is very inefficient.
Instead we can simply store the cache size in an constant and increase
it everytime a file is added into the cache.
Running `crystal spec` without a file argument essentially produces one
big program that combines every single spec file, their imports, and
the files that those imports themselves depend on. Most of the types
within this combined program will get ignored by the compiler due to a
lack of any calls to them from the spec files.
But for some types, partially the HTTP module ones, using them within
the spec files will suddenly make the compiler enable a bunch of
previously ignored code. And those code will suddenly require the
presence of additional types, constants, etc. This not only make it
annoying for getting the specs working but also makes it difficult to
isolate behaviors for testing.
The `static_assets_handler_spec.cr` causes this issue and so will be
marked as an isolated spec for now. In the future all of the tests
should be organized into independent groupings similar to how the
Crystal compiler splits their tests into std, compiler, primitives and
interpreter.
Overriding `#call` or patching out `serve_file_compressed` provides
only minimal benefits over the ease of maintenance granted by only
overriding what we need to for the caching behavior.