Commit Graph

3536 Commits

Author SHA1 Message Date
Fijxu
be51c9d3f0 Merge remote-tracking branch 'upstream'
Some checks failed
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.3, true) (push) Has been cancelled
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.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
Stale issue handler / stale (push) Has been cancelled
Invidious CI / build - crystal: 1.12.2, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.13.3, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.14.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.15.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.16.3, stable: true (push) Has been cancelled
Invidious CI / build - crystal: nightly, stable: false (push) Has been cancelled
Invidious CI / Test AMD64 Docker build (push) Has been cancelled
Invidious CI / Test ARM64 Docker build (push) Has been cancelled
2025-10-16 22:01:19 -03: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
84622843b4 Merge remote-tracking branch 'upstream' 2025-10-16 17:39:11 -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
686fe16c99 Merge remote-tracking branch 'upstream' 2025-10-16 17:30:27 -03:00
Fijxu
8473ad5281 refactor video cache 2025-10-16 17:28:03 -03:00
Fijxu
aa8b5cfd4b feat: Add Video Cache compression
Video information from youtube always weight about ~60KB uncompressed.
When using Deflate to compress that information, it gets compressed down
to ~15KB, so now you will be able to store up to 4x entries more with
caching enabled.

For context, nadeko.net Invidious instance stores 54.7k keys, since we
also store the `time` in a different key associated to the video ID, the
real count of videos cached would be 27.3k. With compression enabled,
the Redis database will be able to store up to 4 times more videos in
cache, which is 109.2k videos cached.

Pretty cool huh.
2025-10-16 17:20:01 -03:00
Fijxu
24218dc5df Set all video info for cache in a struct 2025-10-16 15:42:29 -03:00
Fijxu
c5db4c89b8 Gracefully exit when is not possible to connect to Redis for Video cache 2025-10-16 14:20:30 -03:00
Fijxu
ae5de9e015 feat: add customizable video buffer lenghts
Some checks failed
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.3, true) (push) Has been cancelled
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.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-10-05 18:16:41 -03:00
Fijxu
8bc5f938a7 Remove DEPRECATED session tokens
They are not used anymore at all, 100% deprecated as they are not used
anymore
2025-10-05 17:48:03 -03:00
Fijxu
34ebd331e4 Fix: Handle CSP header correctly
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-09-28 00:00:42 -03: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
Fijxu
a0583acd54 run crystal tool format
Some checks are pending
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Waiting to run
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.3, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.2, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.1, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.1, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.16.3, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Waiting to run
Invidious CI / Test ${{ matrix.name }} Docker build (AMD64, ubuntu-latest) (push) Waiting to run
Invidious CI / Test ${{ matrix.name }} Docker build (ARM64, ubuntu-24.04-arm) (push) Waiting to run
Invidious CI / lint (push) Waiting to run
2025-09-12 23:42:43 -03:00
Fijxu
65d7bad723 remove automatic config reload
Not really needed anymore
2025-09-12 23:40:49 -03:00
Fijxu
452d62d289 Merge remote-tracking branch 'upstream/master' 2025-09-12 23:36:58 -03:00
Fijxu
f9cf70f9d7 Add default playlist preference (#5449)
* Add default playlist preference

Closes https://github.com/iv-org/invidious/issues/5421

* Add option to set default playlist to none

* Move it to player preferences
2025-09-11 11:05:09 -03:00
Fijxu
ba02a4cdf5 Prevent player microformat from being overwritten by the next microformat (#5453)
* Prevent player microformat from being overwritten by the next microformat

Closes https://github.com/iv-org/invidious/issues/5443

The player microformat is what we need to get the published date,
premiere timestamp, allowed regions and more information of the video.

Youtube introduced a new `microformat.microformatDataRenderer` in the
next endpoint which overwrote the player microformat
`microformat.playerMicroformatRenderer` when merged

* Update src/invidious/videos/parser.cr

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

---------

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
2025-09-08 17:16:22 -03:00
Emilien
cf2dfbb75d chore: remove debug 2025-09-08 21:34:47 +02:00
Emilien
21c13bba9d chore: use api captions from companion when available 2025-09-08 21:34:47 +02:00
syeopite
5e9d51c06e Refactor FilteredCompressHandler to inherit from stdlib
This changes its behavior to align with the stdlib variant in that
compression is now delayed till the moment that the server begins to
send a response.

This allows the handler to avoid compressing empty responses,and
safeguards against any double compression of content that may occur
if another handler decides to compressi ts response.

This does however come at the drawback(?) of it now removing
`content-length` headers on requests if it exists; since compression
makes the value inaccurate anyway.

See: https://github.com/crystal-lang/crystal/pull/9625
2025-09-08 21:34:47 +02:00
Emilien
1653dd629e fix formatting 2025-09-08 21:34:47 +02:00
Emilien
cba2adc6ef fix csp + progress proxy + allow omit public_url 2025-09-08 21:34:47 +02:00
Emilien
42b955d713 chore: add the suggestions 2025-09-08 21:34:47 +02:00
Emilien
324a416fd4 initial support for base_url with invidious companion + proxy invidious_companion 2025-09-08 21:34:47 +02:00
Fijxu
7250a6b25d feat: add preference to set default trending page
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
Closes https://git.nadeko.net/Fijxu/invidious/issues/212

Enjoy xCbl6YaK4PEX6d9g6m26YMdHJtQgJ
2025-09-07 01:10:17 -03:00
Fijxu
83760a8e66 fix: strip " " also 2025-09-07 01:10:16 -03:00
Fijxu
acba0c9091 feat: add experimental support to hide channels from the popular page 2025-09-06 22:00:43 -04:00
Fijxu
acedcb7303 Merge remote-tracking branch 'upstream/master'
Some checks failed
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.3, true) (push) Has been cancelled
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.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-09-01 22:06:23 -04:00
Fijxu
36ac67610d fix(parser): fix unavailable comments on videos
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
2025-08-27 20:36:45 -04:00
Fijxu
71e6c16348 style: run crystal tool format 2025-08-27 20:21:27 -04:00
syeopite
fd8dc93569 Show message when connection to the database is not possible (#5346) 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
6badb80082 Channels: Fix fetching channel playlists (#5418) 2025-08-23 03:26:49 -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
Kristian Vos
dd8086e6d9 fix: fetching channel playlists returned 500 error 2025-08-13 15:43:54 +02:00
Fijxu
6b2e4f0cd3 fix: wrong current_companion set when current_companion overflows
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
2025-07-21 14:54:24 -04:00
Fijxu
85b99349ad fix: select a random companion if there is no working ends 2025-07-21 14:37:04 -04: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