Kilt is unmaintained and the ECR templating logic has been
natively integrated into Kemal with the issues previously seen
having been resolved.
This commit is mostly a precursor to support the next Kemal
release which will add the ability to create error handlers for
raised exceptions.
See https://github.com/kemalcr/kemal/pull/688
The crystal compiler seems to evaluate `require` in an alphabetical way,
so if anyone in the future, wants to add another job and that job is
above `base_job.cr` in alphabetical order, the compiler is going to fail
with `Error: undefined constant: Invidious::Jobs::BaseJob`.
This doesn't fix anything, but it will prevent a future headache.
Invidious does not currently support non-livestream hls playback
Originally, the HLS manifest check was essentially a boolean:
if the HLS manifest field was present, it was assumed to be a
livestream. Some videos include the HLS Manifest but aren't
livestreams.
In the case where they are livestreams, the video contains a videoType
field with the value "Livestream". In the case that they're normal
videos, the videoType is "Video". This is exposed via the
`video.live_now` property.
This commit just checks that `video.live_now` is true before treating
it as a livestream
The automatic instance redirection has the potential to pick
the same instance the user is currently on. This is especially
prevalent when the instance list is limited in number like how it is
today.
This PR checks the domain of the instance and ensures that it is not
the same as the current instane before redirecting the user to it.
Otherwise, it just sends the user to rediret.invidious.io
I did this to get rid of Redis compatible DBs and for speed purposes.
This is considered experimental, but everything works fine from
what I have tested.
Here are some benchmarks using the built-in benchmark library of
crystal:
\# built-in release
cache get 19.79M ( 50.54ns) (± 4.12%) 32.0B/op fastest
cache insert 7.88k (126.86µs) (± 2.20%) 65.5kB/op fastest
cache get 4.31k (232.11µs) (± 5.50%) 104kB/op fastest
\# redis release
cache get 22.27k ( 44.90µs) (± 6.40%) 264B/op fastest
cache insert 4.74k (211.01µs) (± 4.72%) 65.7kB/op fastest
cache get 2.51k (399.11µs) (±13.15%) 129kB/op fastest
---
OP/s are way higher, and memory usage per call is lower, so it's a win
win.
Originally, the HLS manifest check was essentially a boolean: if the HLS
manifest field was present, it was assumed to be a livestream. Some
videos include the HLS Manifest but aren't livestreams.
In the case where they are livestreams, the video contains a videoType
field with the value "Livestream". In the case that they're normal
videos, the videoType is "Video". This is exposed via the video.live_now
method.
This commit just checks that video.live_now is true before treating it
as a livestream