5754 Commits

Author SHA1 Message Date
syeopite
7749ea1956 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-12-19 12:35:00 +01:00
syeopite
9e482b4807 Add specs for the new StaticAssetsHandler 2025-12-19 12:35:00 +01:00
syeopite
6fd1cb3585 Compare against 1.17.0-dev until full release 2025-12-19 12:35:00 +01:00
syeopite
ddfbed68f7 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-12-19 12:35:00 +01:00
syeopite
d2be57a454 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-12-19 12:35:00 +01:00
Fijxu
eed8f25a3d
dockerfile: compile openssl instead of using the one bundled on the crystal alpine image. (#5441)
* dockerfile: compile openssl instead of using the one bundled on the crystal alpine image.

* fix formatting

* CI: add --no-cache to openssl-builder

* CI: add Dockerfile.arm64 version

* add comment why we compile openssl ourselves

* fix wrong position of comment

* oopsie

* verify openssl checksums

* set nproc for openssl make

* use ARG for openssl sha256 checksum
2025-12-18 10:16:15 +01:00
dependabot[bot]
cf52a35366
Bump actions/cache from 4 to 5 (#5569)
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  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-12-15 22:49:01 +01:00
Fijxu
aba31a8e20
Set Kemal max_request_line_size to 16384 for large channel continuation query parameters. (#5566)
* feat: Add configurable max_request_line_size to handle long URLs

This commit adds a new configuration option `max_request_line_size` that allows
users to increase the HTTP request line size limit. This is particularly useful
for handling very long continuation tokens that can cause 414 (URI Too Long) errors.

Changes:
- Add `max_request_line_size` property to Config class
- Configure Kemal server to use the custom limit if specified
- Document the option in config.example.yml with recommendations
- Add examples in docker-compose.yml for both YAML and env var configuration

The default behavior remains unchanged (8KB limit) unless explicitly configured.
This provides a solution for users experiencing 414 errors without affecting
existing installations.

* Hardcode max_request_line_size to 16384

---------

Co-authored-by: Sunghyun Kim <hello@sunghyun.me>
2025-12-15 08:21:55 +01:00
Sebastian Hädrich
994c25de2e
Add link to GitHub release/tag/commit in footer (#4702)
* Add link to GitHub release/tag/commit in footer

* Only show tag if there is one

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>

---------

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
2025-12-14 19:30:52 -03:00
Fijxu
65463333f3
Display "Erroneous CAPTCHA" for invalid captchas (#5508) 2025-12-11 17:28:20 -03:00
Fijxu
ef2290c1fd
Fix channel name overflow (#5553) 2025-12-06 20:20:42 -03:00
Fijxu
3944d2490c
Fix trending page by leaving livestream and gaming trending pages (#5555)
The livestream trending page is now the default.

Adds `content_container = special_category_container["gridRenderer"]?` in the `CategoryRendererParser`
needed for the gaming trending page. The JSON structure of the gaming
trending page looked like this:

```json
"contents": {
 "twoColumnBrowseResultsRenderer": {
  "tabs": [
   {
    "tabRenderer": {
     "selected": true,
     "content": {
      "sectionListRenderer": {
       "contents": [
        {
         "itemSectionRenderer": {
          "contents": [
           {
            "shelfRenderer": {
             "title": {
              "runs": [
               {
                "text": "Trending videos"
               }
              ]
             },
             "content": {
              "gridRenderer": { // <- This was added to the CategoryRendererParser
               "items": [
                {
                 "gridVideoRenderer": {
                  "videoId": "sTWztaLjD20",
                  // More video data
                  // ...
                 }
                }
               ]
              }
             }
            }
           }
          ]
         }
        }
       ]
      }
     }
    }
   }
  ]
 }
}
```

Thanks to
ae2755bf71/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/kiosk/YoutubeTrendingGamingVideosExtractor.java (L11-L13)
for the `browse_id` and `params` needed for the gaming trending page.
2025-12-06 20:19:38 -03:00
Fijxu
a7935bc378
fix: restore dmca_content functionality (#5228)
* fix: restore dmca_content functionality

This restores (or adds) the functionality of the `dmca_content` config
option that at this date, has been unused and makes no effect.

* only disable download widget for dmca video ids
2025-12-06 17:15:25 -03:00
Fijxu
07f3894a71
Remove signature helper completely from Invidious (#5550)
* Remove signature helper completely from Invidious

The official way to reproduce video with Invidious now is by using
Invidious Companion which uses Youtube.JS with a Javascript Interpreter
that can successfully decrypt youtube video URLs.

Sig helper has not been used for a long time, is beyond broken and no
one has plans to fix it and maintain it.

* Remove DECRYPT_FUNCTION and shrink player function

* remove `sp = cfr[sp]`

* Improve message
2025-12-06 16:50:59 -03:00
Fijxu
46a9c933be
Fix community posts when there is a unavailable video in a post (#5549)
Posts with a video that has been removed returned
`ProblematicTimelineItem` type which was not taken in account for
community posts.

Now community posts with a broken video will not display an embedded
video.
2025-12-04 12:00:58 -03:00
Fijxu
48765f759d
chore: Update shard.yml to use SPDX license identifier (#5552) 2025-12-04 11:59:55 -03:00
Fijxu
35d1d499bc
chore: Store preferences in a variable when reused and rename prefs to preferences (#5450)
A little code cleanup on places where `preferences` is used more than one time and rename `prefs` to `preferences` to maintain consistency.
2025-12-02 18:20:15 -03:00
Émilien (perso)
b2ecd8abc3
chore: update healthcheck for /api/v1/stats
since /api/v1/trending doesn't work anymore
2025-11-25 14:32:15 +01:00
dependabot[bot]
bb9c4a01a1 Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [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/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 08:40:27 +01:00
dependabot[bot]
c250b9c0b1 Bump crystal-lang/install-crystal from 1.8.3 to 1.9.1
Bumps [crystal-lang/install-crystal](https://github.com/crystal-lang/install-crystal) from 1.8.3 to 1.9.1.
- [Release notes](https://github.com/crystal-lang/install-crystal/releases)
- [Commits](https://github.com/crystal-lang/install-crystal/compare/v1.8.3...v1.9.1)

---
updated-dependencies:
- dependency-name: crystal-lang/install-crystal
  dependency-version: 1.9.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 23:00:49 +01:00
shiny-comic
5cfe294063
Fix 0 view count on related videos section (#5446)
* Fix 0 view count on related videos

* Remove view_count variable since it's unused by Innertube

* Remove view_count from specs and API

---------

Co-authored-by: Fijxu <fijxu@nadeko.net>
2025-10-16 21:59:34 -03:00
Fijxu
0c13c4fab1
Prevent timestamp from being set for Livestreams on "Watch on Youtube" links (#5481) 2025-10-16 17:32:01 -03:00
Fijxu
fdf0a25b9e
Add Livestreams to trending page (#5480) 2025-10-16 17:31:48 -03:00
Fijxu
3226e17953
Fix button overflow (#5452) 2025-10-16 17:31:33 -03:00
dependabot[bot]
710b3f250b Bump crystal-lang/install-crystal from 1.8.2 to 1.8.3
Bumps [crystal-lang/install-crystal](https://github.com/crystal-lang/install-crystal) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/crystal-lang/install-crystal/releases)
- [Commits](https://github.com/crystal-lang/install-crystal/compare/v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: crystal-lang/install-crystal
  dependency-version: 1.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-30 19:56:16 +02:00
Alex
42d34cd084 Removed specific section from hyperlink in config.cr 2025-09-24 18:54:27 +02:00
Alex
18a8490587 Fixed broken companion hyperlink 2025-09-24 18:54:27 +02:00
syeopite
325e013e0d
Prepare for the next release 2025-09-13 11:55:10 -07:00
syeopite
cf019e3b45
Release v2.20250913.0 (#5463)
This release primarily marks Invidious companion's ascend out of beta and its stable integration thereof into Invidious!

For those unaware Invidious companion is the successor to the `inv-sig-helper` tool, designed to securely pass YouTube's attestation checks and allow for the efficient retrieval and playback of video streams reliably.

Companion delivers YouTube fixes faster since it’s built on the community-driven [YouTube.js](https://github.com/LuanRT/YouTube.js) project, used by many open source projects such as [FreeTube](https://github.com/FreeTubeApp/FreeTube).

For more information see https://github.com/iv-org/invidious-companion and https://docs.invidious.io/installation/

But companion isn't the only new thing in this release!

Invidious will no longer error out completely as soon as a single item failed to parse in search results, channel pages, etc. Instead it now handles it gracefully by substituting those problematic items with an error card and rendering the page normally.

The player has gained some quality of life features such as being able to choose a default playlist for videos to be added to, or persisting caption appearance settings across the session.

Base Invidious video retrieval without Invidious companion has also been made more stable.

And finally a significant amount of bugs were fixed alongside many other minor improvements.

Co-authored-by: Émilien (perso) <4016501+unixfox@users.noreply.github.com>
v2.20250913.0
2025-09-13 17:44:38 +00:00
Samantaz Fox
c8b4325b4f
Translations update from Hosted Weblate (#5313) 2025-09-13 14:43:17 +02:00
Hosted Weblate
36086ce083
Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:45 +00:00
Hosted Weblate
5405320b96
Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:42 +00:00
Hosted Weblate
6ce4717ed0
Update Alemannic translation
Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Update Alemannic translation

Add Alemannic translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Lenny Angst <lenny@familie-angst.ch>
2025-09-12 15:06:37 +00:00
Hosted Weblate
fce446c10e
Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:32 +00:00
Hosted Weblate
d047a686a4
Update Serbian (Cyrillic script) translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: NEXI <nexiphotographer@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:28 +00:00
Hosted Weblate
87d3bd0ab8
Update Chinese (Simplified Han script) translation
Update Chinese (Simplified Han script) translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:24 +00:00
Hosted Weblate
a35fa2bd3c
Update Chinese (Traditional Han script) translation
Update Chinese (Traditional Han script) translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:22 +00:00
Hosted Weblate
4ce4faec13
Update Portuguese (Portugal) translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:19 +00:00
Hosted Weblate
aa1f8d0e63
Update Slovenian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Damjan Gerl <damjan@damjan.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:16 +00:00
Hosted Weblate
4c57aba1f3
Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:12 +00:00
Hosted Weblate
5643cb1c4d
Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:09 +00:00
Hosted Weblate
5a1d39683b
Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:06 +00:00
Hosted Weblate
8ffbed0d38
Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:03 +00:00
Hosted Weblate
6928be1298
Update Serbian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: NEXI <nexiphotographer@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:06:00 +00:00
Hosted Weblate
39c930145a
Update Finnish translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jiri Grönroos <jiri.gronroos@iki.fi>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:05:58 +00:00
Hosted Weblate
7ab925e45b
Update Persian translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Atur <aturaseman9@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:05:55 +00:00
Hosted Weblate
fc76964c87
Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:05:49 +00:00
Hosted Weblate
2c7e513c63
Update French translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Tristan B <tristanb0@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:05:46 +00:00
Hosted Weblate
28cf74e321
Update Spanish translation
Update Spanish translation

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: TransGecko <sigekos824@mongrec.com>
Co-authored-by: Álvaro Alonso Ramírez <aalonsoramirez@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:05:42 +00:00
Hosted Weblate
692a12336a
Update Dutch translation
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Dick Groskamp <dikgro@yahoo.co.uk>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2025-09-12 15:05:36 +00:00