Commit Graph

5669 Commits

Author SHA1 Message Date
syeopite
2c030a9a35
Merge a49bfa75a7 into fd8dc93569 2025-08-24 04:45:14 +00:00
syeopite
a49bfa75a7
Reduce indent in StaticAssetsHandler#serve_file 2025-08-23 20:51:30 -07:00
syeopite
fd8dc93569
Show message when connection to the database is not possible (#5346)
Some checks failed
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.3, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.16.3, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Has been cancelled
Invidious CI / Test ${{ matrix.name }} Docker build (AMD64, ubuntu-latest) (push) Has been cancelled
Invidious CI / Test ${{ matrix.name }} Docker build (ARM64, ubuntu-24.04-arm) (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
2025-08-23 04:04:06 -07:00
syeopite
67f93e55d8
Fix "ex" variable collision in invidious.cr
The exception handling for database connections results in an
`ex` variable which Ameba sees as overshadowing the `ex` used by the
`ex` block arg used to define the HTTP status code 500 handler below.

Although this is a non-issue since the db connection exception handling
will cause Invidious to exit, Ameba's nature as a static checker means
that it isn't aware of this.

The simplest fix without a dirty ameba ignore comment is to rename `ex`
within the Kemal handler block below, since `ex` within a begin rescue
block is a Crystal convention that will also cause Ameba to raise when
not adhered to.
2025-08-23 03:35:59 -07:00
syeopite
f35f529adc
Videos: Fix missing .id to retrieve first playlist video ID (#5366) 2025-08-23 03:30:00 -07:00
syeopite
b32b077a80
Player: Persist caption settings (#5417) 2025-08-23 03:29:07 -07:00
syeopite
6badb80082
Channels: Fix fetching channel playlists (#5418) 2025-08-23 03:26:49 -07:00
syeopite
15099ac1dd
Frontend: Fix notification count of TRUE (#5391) 2025-08-23 03:26:11 -07:00
syeopite
adc83f1c09
Documentation: Fix typo (effet -> effect) (#5369) 2025-08-23 03:23:42 -07:00
syeopite
41e0e77d33
HTML: Add Missing Noreferrers (#5368) 2025-08-23 03:23:05 -07:00
syeopite
9ebc76462f
Channels: Fix fetching of individual community posts (#5361) 2025-08-23 03:20:04 -07:00
syeopite
0308acb624
Videos: Add fallback to TvSimply client (#5345) 2025-08-23 03:18:41 -07:00
syeopite
cac2397494
YTAPI: Add TvSimply client (#5344) 2025-08-23 03:17:28 -07:00
syeopite
cf640d808e
YtAPI: Bump client versions (#5325) 2025-08-23 03:16:55 -07:00
syeopite
80ec027c8f
CI: Fix docker ci job not checking if Invidious starts successfully or not (#5306) 2025-08-23 03:16:32 -07:00
syeopite
6f5f0dceca
CI: Use public ARM64 Github actions runners for ARM64 builds (#5305) 2025-08-23 03:16:05 -07:00
syeopite
a8ab7b61f7
Player: Add keyboard shortcuts to configure captions (#5188) 2025-08-23 03:15:28 -07:00
Kristian Vos
dd8086e6d9
fix: fetching channel playlists returned 500 error 2025-08-13 15:43:54 +02:00
Eugene Pakhomov
875d8e7e41 Persist caption settings 2025-08-13 14:39:58 +03:00
dependabot[bot]
1ae0f45b0e
Bump actions/checkout from 4 to 5 (#5415)
Some checks failed
Build and release container directly from master / release (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.3, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.16.3, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Has been cancelled
Invidious CI / build-docker (push) Has been cancelled
Invidious CI / build-docker-arm64 (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 15:06:16 +02:00
fieryhenry
3335bc8c38
Get a count of 0 if STORAGE_KEY_NOTIF_COUNT is not present in storage
Not sure if this is necessary as I think it should always be present in storage, but just in case it isn't
2025-07-18 19:07:41 +00:00
fieryhenry
a84bb1d22e
Fix TRUE number of notifications
`update_ticker_count` used to use STORAGE_KEY_STREAM to get the number of notifications which is a boolean value, now it uses STORAGE_KEY_NOTIF_COUNT which is an integer
2025-07-18 19:02:50 +00:00
epicsam123
24252b836c
add back semicolon 2025-06-30 22:38:30 -04:00
Nami Sunami
227c041b86
fix(config.example.yml): Fix typo (effet -> effect) 2025-06-28 11:38:31 +02:00
ChunkyProgrammer
803311713d make sort_by code more legible 2025-06-27 11:38:08 -04:00
epicsam123
64ac3b5203
add missing noreferrers 2025-06-26 18:40:06 -04:00
Samantaz Fox
b0c9f87fbe
Fix missing .id to retrieve first playlist video ID
This was missed in the review of PR 5196
2025-06-26 19:09:52 +00:00
ChunkyProgrammer
f8febbe2b2 format changes 2025-06-25 23:53:07 -04:00
ChunkyProgrammer
436f955e0f update fetch_community_post_comments protobuf to match currently used protobuf, add sort_by option 2025-06-25 23:34:30 -04:00
ChunkyProgrammer
4155f15bf7 update resolve_url api to better support new post endpoint 2025-06-25 23:33:28 -04:00
ChunkyProgrammer
b9171d9dab Update protobuf for individual community post 2025-06-25 22:35:16 -04:00
ChunkyProgrammer
f3f6937ffc Fix community tab not loading 2025-06-25 22:22:30 -04:00
Fijxu
8723fdca06
Update src/invidious.cr
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2025-06-21 12:02:32 -04:00
Fijxu
d51e1cb051
remove fallback to TV client 2025-06-15 17:45:53 -04:00
Fijxu
cf0a68bd77
store adaptiveFormats data into a variable 2025-06-15 17:43:07 -04:00
Fijxu
8cd9d53fb1
show message when connection to the database is not possible 2025-06-12 18:44:01 -04:00
Fijxu
01cdb384e0
add suggestions from syeopite 2025-06-12 17:25:19 -04:00
Fijxu
b1e7e0c45e
replace url by signatureCipher if url is not present 2025-06-12 16:18:01 -04:00
Fijxu
0c96e0977f
check for signatureCipher too 2025-06-12 16:07:58 -04:00
Fijxu
37be513e14
Add fallback to TvSimply client 2025-06-12 01:25:59 -04:00
Fijxu
4daf1f0818
Add TvSimply client
Data taken from: 8cf658151f, 689fb0b90e and b15f623dab
2025-06-12 01:24:45 -04:00
syeopite
c012206f80
Improve cache size check to be more performant
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.
2025-06-03 17:10:10 -07:00
syeopite
52865ff0a2
Refactor logic for updating temp files in tests 2025-06-03 17:07:51 -07:00
syeopite
dc198546a0
Fix Ameba Lint/UselessAssign 2025-06-03 16:40:35 -07:00
syeopite
7226a72824
Isolate static assets handler spec from others
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.
2025-06-03 16:39:59 -07:00
syeopite
6c927c89a6
Add specs for the new StaticAssetsHandler 2025-06-03 16:35:40 -07:00
syeopite
60172a2e6a
Compare against 1.17.0-dev until full release 2025-06-03 09:23:28 -07:00
syeopite
628f45de01
Simplify StaticAssetsHandler implementation
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.
2025-06-03 09:04:33 -07:00
syeopite
748ef23326
Replace Kemal::StaticFileHandler on Crystal < 1.17.0
Kemal's subclass of the stdlib `HTTP::StaticFileHandler` is not as
maintained as its parent, and so misses out on many enhancements and bug
fixes from upstream, which unfortunately also includes the patches for
security vulnerabilities...

Though this isn't necessarily Kemal's fault since the bulk of the stdlib
handler's logic was done in a single big method, making any changes hard
to maintain. This was fixed in Crystal 1.17.0 where the handler
was refactored into many private methods, making it easier for an
inheriting type to implement custom behaviors while still leveraging
much of the pre-existing code.

Since we don't actually use any of the Kemal specific features added by
`Kemal::StaticFileHandler`, there really isn't a reason to not just
create a new handler based upon the stdlib implementation instead which
will address the problems mentioned above.

This PR implements a new handler which inherits from the stdlib variant
and overrides the helper methods added in Crystal 1.17.0 to add the
caching behavior with minimal code changes. Since this new handler
depends on the code in Crystal 1.17.0, it will only be applied on
versions greater than or equal to 1.17.0. On older versions we'll
fallback to the current monkey patched `Kemal::StaticFileHandler`
2025-06-03 07:50:21 -07:00
syeopite
df8839d1f0
Make base-Invidious video info extraction more resilient (#5312)
Some checks failed
Build and release container directly from master / release (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.3, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.16.3, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Has been cancelled
Invidious CI / build-docker (push) Has been cancelled
Invidious CI / build-docker-arm64 (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
Try next fallback client if one raises

Convert `dig` to `dig?`

Optimize companionless stream retrieval
2025-05-28 20:18:51 +00:00