mirror of
https://git.nerdvpn.de/NerdVPN.de/invidious
synced 2026-02-14 22:51:42 +01:00
Update all patches after upstream changes
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
patches/invidious_old
|
||||||
|
patches/invidious/rename.sh
|
||||||
|
|||||||
@@ -40,14 +40,12 @@ diff --git a/src/routes/invidious_routes/dashManifest.ts b/src/routes/invidious_
|
|||||||
index b582b40..b4ed64c 100644
|
index b582b40..b4ed64c 100644
|
||||||
--- a/src/routes/invidious_routes/dashManifest.ts
|
--- a/src/routes/invidious_routes/dashManifest.ts
|
||||||
+++ b/src/routes/invidious_routes/dashManifest.ts
|
+++ b/src/routes/invidious_routes/dashManifest.ts
|
||||||
@@ -62,7 +62,9 @@ dashManifest.get("/:videoId", async (c) => {
|
@@ -71,7 +71,7 @@ dashManifest.get("/:videoId", async (c) => {
|
||||||
videoInfo.streaming_data.adaptive_formats = videoInfo
|
videoInfo.streaming_data.adaptive_formats = videoInfo
|
||||||
.streaming_data.adaptive_formats
|
.streaming_data.adaptive_formats
|
||||||
.filter((i) =>
|
.filter((i) =>
|
||||||
- i.has_video === false || i.mime_type.includes("mp4")
|
- i.mime_type.includes("mp4")
|
||||||
+ //@ts-ignore: 'i.height' is possibly 'undefined'.
|
+ i.mime_type.includes("mp4") && i.height <= config.server.max_dash_resolution
|
||||||
+ i.has_video === false || (i.mime_type.includes("mp4") && (i.height <= config.server.max_dash_resolution))
|
|
||||||
+
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const player_response = videoInfo.page[0];
|
const player_response = videoInfo.page[0];
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
From 728518d798a92b4374408a832e5fa0d030f70933 Mon Sep 17 00:00:00 2001
|
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
|
||||||
Date: Mon, 13 Oct 2025 09:54:12 +0200
|
|
||||||
Subject: [PATCH 01/18] [Patch] 001 - compile openssl
|
|
||||||
|
|
||||||
---
|
|
||||||
docker/Dockerfile | 13 ++++++++++++-
|
|
||||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/docker/Dockerfile b/docker/Dockerfile
|
|
||||||
index 4cfc3c72..1b33ae14 100644
|
|
||||||
--- a/docker/Dockerfile
|
|
||||||
+++ b/docker/Dockerfile
|
|
||||||
@@ -1,10 +1,20 @@
|
|
||||||
-FROM crystallang/crystal:1.16.3-alpine AS builder
|
|
||||||
+# https://github.com/openssl/openssl/releases/tag/openssl-3.5.2
|
|
||||||
+ARG OPENSSL_VERSION='3.5.2'
|
|
||||||
+
|
|
||||||
+FROM mirror.gcr.io/84codes/crystal:1.16.3-alpine AS builder
|
|
||||||
|
|
||||||
RUN apk add --no-cache sqlite-static yaml-static
|
|
||||||
+RUN apk del openssl-dev openssl-libs-static
|
|
||||||
+RUN apk add curl perl linux-headers
|
|
||||||
|
|
||||||
ARG release
|
|
||||||
|
|
||||||
WORKDIR /invidious
|
|
||||||
+
|
|
||||||
+ARG OPENSSL_VERSION
|
|
||||||
+RUN curl -Ls "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz" | tar xz
|
|
||||||
+RUN cd openssl-${OPENSSL_VERSION} && ./Configure --openssldir=/etc/ssl && make -j
|
|
||||||
+
|
|
||||||
COPY ./shard.yml ./shard.yml
|
|
||||||
COPY ./shard.lock ./shard.lock
|
|
||||||
RUN shards install --production
|
|
||||||
@@ -22,6 +32,7 @@ COPY ./videojs-dependencies.yml ./videojs-dependencies.yml
|
|
||||||
RUN crystal spec --warnings all \
|
|
||||||
--link-flags "-lxml2 -llzma"
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/crystal if [[ "${release}" == 1 ]] ; then \
|
|
||||||
+ PKG_CONFIG_PATH=$PWD/openssl-${OPENSSL_VERSION} \
|
|
||||||
crystal build ./src/invidious.cr \
|
|
||||||
--release \
|
|
||||||
--static --warnings all \
|
|
||||||
--
|
|
||||||
2.39.5
|
|
||||||
|
|
||||||
+28
-13
@@ -1,15 +1,15 @@
|
|||||||
From 855a84c20b4a7c1e1dde57152f430ace10ed45b8 Mon Sep 17 00:00:00 2001
|
From e95b4364979bd95ece3ecdbf18f2d60bf3f06a3f Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:33:56 +0200
|
Date: Sat, 20 Dec 2025 11:23:17 +0100
|
||||||
Subject: [PATCH 02/18] [Patch] - 002 nerdvpn.de branding
|
Subject: [PATCH 01/16] NerdVPN.de branding
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious.cr | 4 ++--
|
src/invidious.cr | 4 ++--
|
||||||
src/invidious/views/template.ecr | 10 ++++++++--
|
src/invidious/views/template.ecr | 24 +++++++-----------------
|
||||||
2 files changed, 10 insertions(+), 4 deletions(-)
|
2 files changed, 9 insertions(+), 19 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/invidious.cr b/src/invidious.cr
|
diff --git a/src/invidious.cr b/src/invidious.cr
|
||||||
index 197b150c..a1a6d422 100644
|
index a61f91a9..52fbca27 100644
|
||||||
--- a/src/invidious.cr
|
--- a/src/invidious.cr
|
||||||
+++ b/src/invidious.cr
|
+++ b/src/invidious.cr
|
||||||
@@ -81,9 +81,9 @@ REQUEST_HEADERS_WHITELIST = {"accept", "accept-encoding", "cache-control", "con
|
@@ -81,9 +81,9 @@ REQUEST_HEADERS_WHITELIST = {"accept", "accept-encoding", "cache-control", "con
|
||||||
@@ -21,14 +21,14 @@ index 197b150c..a1a6d422 100644
|
|||||||
CURRENT_COMMIT = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}
|
CURRENT_COMMIT = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}
|
||||||
-CURRENT_VERSION = {{ "#{`git log -1 --format=%ci | awk '{print $1}' | sed s/-/./g`.strip}" }}
|
-CURRENT_VERSION = {{ "#{`git log -1 --format=%ci | awk '{print $1}' | sed s/-/./g`.strip}" }}
|
||||||
+CURRENT_VERSION = {{ "#{`date +%Y.%m.%d`.strip}" }}
|
+CURRENT_VERSION = {{ "#{`date +%Y.%m.%d`.strip}" }}
|
||||||
|
CURRENT_TAG = {{ "#{`git tag --points-at HEAD`.strip}" }}
|
||||||
|
|
||||||
# This is used to determine the `?v=` on the end of file URLs (for cache busting). We
|
# This is used to determine the `?v=` on the end of file URLs (for cache busting). We
|
||||||
# only need to expire modified assets, so we can use this to find the last commit that changes
|
|
||||||
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
|
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
|
||||||
index 9904b4fc..8c1b7ffe 100644
|
index 0e0f2e16..df83aab2 100644
|
||||||
--- a/src/invidious/views/template.ecr
|
--- a/src/invidious/views/template.ecr
|
||||||
+++ b/src/invidious/views/template.ecr
|
+++ b/src/invidious/views/template.ecr
|
||||||
@@ -142,14 +142,20 @@
|
@@ -143,30 +143,20 @@
|
||||||
<i class="icon ion-ios-paper"></i>
|
<i class="icon ion-ios-paper"></i>
|
||||||
<a href="/privacy"><%= translate(locale, "View privacy policy.") %></a>
|
<a href="/privacy"><%= translate(locale, "View privacy policy.") %></a>
|
||||||
</span>
|
</span>
|
||||||
@@ -36,6 +36,7 @@ index 9904b4fc..8c1b7ffe 100644
|
|||||||
+ <i class="icon ion-ios-paper"></i>
|
+ <i class="icon ion-ios-paper"></i>
|
||||||
+ <a href="https://nerdvpn.de/terms"><%= translate(locale, "View terms of use.") %></a>
|
+ <a href="https://nerdvpn.de/terms"><%= translate(locale, "View terms of use.") %></a>
|
||||||
+ </span>
|
+ </span>
|
||||||
|
+ </div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-u-1 pure-u-md-1-3">
|
<div class="pure-u-1 pure-u-md-1-3">
|
||||||
@@ -43,14 +44,28 @@ index 9904b4fc..8c1b7ffe 100644
|
|||||||
<i class="icon ion-ios-wallet"></i>
|
<i class="icon ion-ios-wallet"></i>
|
||||||
- <a href="https://invidious.io/donate/"><%= translate(locale, "footer_donate_page") %></a>
|
- <a href="https://invidious.io/donate/"><%= translate(locale, "footer_donate_page") %></a>
|
||||||
+ <a href="/donate/"><%= translate(locale, "footer_donate_page") %></a>
|
+ <a href="/donate/"><%= translate(locale, "footer_donate_page") %></a>
|
||||||
+ </span>
|
</span>
|
||||||
+ <span>
|
<span>
|
||||||
|
- <%= translate(locale, "Current version: ") %>
|
||||||
|
- <% if CONFIG.modified_source_code_url %>
|
||||||
|
- <a href="<%= CONFIG.modified_source_code_url %>/commit/<%= CURRENT_COMMIT %>"><%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %></a>
|
||||||
|
- <% else %>
|
||||||
|
- <a href="https://github.com/iv-org/invidious/commit/<%= CURRENT_COMMIT %>"><%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %></a>
|
||||||
|
- <% end %>
|
||||||
|
- @ <%= CURRENT_BRANCH %>
|
||||||
|
- <% if CURRENT_TAG != "" %>
|
||||||
|
- (
|
||||||
|
- <% if CONFIG.modified_source_code_url %>
|
||||||
|
- <a href="<%= CONFIG.modified_source_code_url %>/releases/tag/<%= CURRENT_TAG %>"><%= CURRENT_TAG %></a>
|
||||||
|
- <% else %>
|
||||||
|
- <a href="https://github.com/iv-org/invidious/releases/tag/<%= CURRENT_TAG %>"><%= CURRENT_TAG %></a>
|
||||||
|
- <% end %>
|
||||||
|
- )
|
||||||
|
- <% end %>
|
||||||
+ <%= translate(locale, "Current version: ") %><a target="_blank" href="https://git.nerdvpn.de/NerdVPN.de/invidious/releases/tag/<%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %>"><%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %></a> @ <%= CURRENT_BRANCH %>
|
+ <%= translate(locale, "Current version: ") %><a target="_blank" href="https://git.nerdvpn.de/NerdVPN.de/invidious/releases/tag/<%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %>"><%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %></a> @ <%= CURRENT_BRANCH %>
|
||||||
</span>
|
</span>
|
||||||
- <span><%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %> @ <%= CURRENT_BRANCH %></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
|
||||||
--
|
--
|
||||||
2.39.5
|
2.39.5
|
||||||
|
|
||||||
+69
-58
@@ -1,7 +1,7 @@
|
|||||||
From 64d36b0b774a018a3f8344c5ebc7e3799b044270 Mon Sep 17 00:00:00 2001
|
From 4a2ea38acf78b4239bb3b8dc53d9daae275d4d11 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 13:28:49 +0200
|
Date: Sat, 20 Dec 2025 11:26:58 +0100
|
||||||
Subject: [PATCH] [Patch] - 003 multiple companion backends
|
Subject: [PATCH 02/16] Companion backend selector
|
||||||
|
|
||||||
---
|
---
|
||||||
locales/en-US.json | 3 +-
|
locales/en-US.json | 3 +-
|
||||||
@@ -11,7 +11,7 @@ Subject: [PATCH] [Patch] - 003 multiple companion backends
|
|||||||
src/invidious/jobs/backend_checker.cr | 14 ++++
|
src/invidious/jobs/backend_checker.cr | 14 ++++
|
||||||
src/invidious/routes/backend_switcher.cr | 16 ++++
|
src/invidious/routes/backend_switcher.cr | 16 ++++
|
||||||
src/invidious/routes/before_all.cr | 57 ++++++++++++-
|
src/invidious/routes/before_all.cr | 57 ++++++++++++-
|
||||||
src/invidious/routes/companion.cr | 9 ++-
|
src/invidious/routes/companion.cr | 12 ++-
|
||||||
src/invidious/routes/watch.cr | 2 +-
|
src/invidious/routes/watch.cr | 2 +-
|
||||||
src/invidious/routing.cr | 1 +
|
src/invidious/routing.cr | 1 +
|
||||||
src/invidious/user/cookies.cr | 21 +++++
|
src/invidious/user/cookies.cr | 21 +++++
|
||||||
@@ -19,29 +19,29 @@ Subject: [PATCH] [Patch] - 003 multiple companion backends
|
|||||||
src/invidious/videos/parser.cr | 8 +-
|
src/invidious/videos/parser.cr | 8 +-
|
||||||
src/invidious/views/template.ecr | 31 +++++++
|
src/invidious/views/template.ecr | 31 +++++++
|
||||||
src/invidious/yt_backend/connection_pool.cr | 15 ++--
|
src/invidious/yt_backend/connection_pool.cr | 15 ++--
|
||||||
src/invidious/yt_backend/youtube_api.cr | 14 +++-
|
src/invidious/yt_backend/youtube_api.cr | 15 +++-
|
||||||
16 files changed, 283 insertions(+), 30 deletions(-)
|
16 files changed, 285 insertions(+), 32 deletions(-)
|
||||||
create mode 100644 src/invidious/helpers/backend_info.cr
|
create mode 100644 src/invidious/helpers/backend_info.cr
|
||||||
create mode 100644 src/invidious/jobs/backend_checker.cr
|
create mode 100644 src/invidious/jobs/backend_checker.cr
|
||||||
create mode 100644 src/invidious/routes/backend_switcher.cr
|
create mode 100644 src/invidious/routes/backend_switcher.cr
|
||||||
|
|
||||||
diff --git a/locales/en-US.json b/locales/en-US.json
|
diff --git a/locales/en-US.json b/locales/en-US.json
|
||||||
index fa28e7f8..eb2c15ec 100644
|
index 5b2ef8d0..55714b50 100644
|
||||||
--- a/locales/en-US.json
|
--- a/locales/en-US.json
|
||||||
+++ b/locales/en-US.json
|
+++ b/locales/en-US.json
|
||||||
@@ -504,5 +504,6 @@
|
@@ -506,5 +506,6 @@
|
||||||
"carousel_go_to": "Go to slide `x`",
|
|
||||||
"timeline_parse_error_placeholder_heading": "Unable to parse item",
|
"timeline_parse_error_placeholder_heading": "Unable to parse item",
|
||||||
"timeline_parse_error_placeholder_message": "Invidious encountered an error while trying to parse this item. For more information see below:",
|
"timeline_parse_error_placeholder_message": "Invidious encountered an error while trying to parse this item. For more information see below:",
|
||||||
- "timeline_parse_error_show_technical_details": "Show technical details"
|
"timeline_parse_error_show_technical_details": "Show technical details",
|
||||||
+ "timeline_parse_error_show_technical_details": "Show technical details",
|
- "dmca_content": "This video cannot be downloaded on this instance due to a DMCA/copyright infringement letter sent to the instance administrator."
|
||||||
|
+ "dmca_content": "This video cannot be downloaded on this instance due to a DMCA/copyright infringement letter sent to the instance administrator.",
|
||||||
+ "backend_unavailable": "The backend you selected is unavailable. You have been redirected to another one"
|
+ "backend_unavailable": "The backend you selected is unavailable. You have been redirected to another one"
|
||||||
}
|
}
|
||||||
diff --git a/src/invidious.cr b/src/invidious.cr
|
diff --git a/src/invidious.cr b/src/invidious.cr
|
||||||
index 197b150c..edee2e81 100644
|
index 52fbca27..8e0d2c1f 100644
|
||||||
--- a/src/invidious.cr
|
--- a/src/invidious.cr
|
||||||
+++ b/src/invidious.cr
|
+++ b/src/invidious.cr
|
||||||
@@ -102,9 +102,11 @@ YT_POOL = YoutubeConnectionPool.new(YT_URL, capacity: CONFIG.pool_size)
|
@@ -103,9 +103,11 @@ YT_POOL = YoutubeConnectionPool.new(YT_URL, capacity: CONFIG.pool_size)
|
||||||
|
|
||||||
GGPHT_POOL = YoutubeConnectionPool.new(URI.parse("https://yt3.ggpht.com"), capacity: CONFIG.pool_size)
|
GGPHT_POOL = YoutubeConnectionPool.new(URI.parse("https://yt3.ggpht.com"), capacity: CONFIG.pool_size)
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ index 197b150c..edee2e81 100644
|
|||||||
|
|
||||||
# CLI
|
# CLI
|
||||||
Kemal.config.extra_options do |parser|
|
Kemal.config.extra_options do |parser|
|
||||||
@@ -209,6 +211,12 @@ Invidious::Jobs.register Invidious::Jobs::ClearExpiredItemsJob.new
|
@@ -201,6 +203,12 @@ Invidious::Jobs.register Invidious::Jobs::ClearExpiredItemsJob.new
|
||||||
|
|
||||||
Invidious::Jobs.register Invidious::Jobs::InstanceListRefreshJob.new
|
Invidious::Jobs.register Invidious::Jobs::InstanceListRefreshJob.new
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ index 197b150c..edee2e81 100644
|
|||||||
|
|
||||||
def popular_videos
|
def popular_videos
|
||||||
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
||||||
index 92c510d0..49903f68 100644
|
index 7853d9a3..f3321aff 100644
|
||||||
--- a/src/invidious/config.cr
|
--- a/src/invidious/config.cr
|
||||||
+++ b/src/invidious/config.cr
|
+++ b/src/invidious/config.cr
|
||||||
@@ -87,6 +87,8 @@ class Config
|
@@ -87,6 +87,8 @@ class Config
|
||||||
@@ -82,7 +82,7 @@ index 92c510d0..49903f68 100644
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Number of threads to use for crawling videos from channels (for updating subscriptions)
|
# Number of threads to use for crawling videos from channels (for updating subscriptions)
|
||||||
@@ -188,6 +190,12 @@ class Config
|
@@ -180,6 +182,12 @@ class Config
|
||||||
# Playlist length limit
|
# Playlist length limit
|
||||||
property playlist_length_limit : Int32 = 500
|
property playlist_length_limit : Int32 = 500
|
||||||
|
|
||||||
@@ -318,12 +318,12 @@ index 63b935ec..b34a2848 100644
|
|||||||
"frame-src 'self'",
|
"frame-src 'self'",
|
||||||
"frame-ancestors " + frame_ancestors,
|
"frame-ancestors " + frame_ancestors,
|
||||||
diff --git a/src/invidious/routes/companion.cr b/src/invidious/routes/companion.cr
|
diff --git a/src/invidious/routes/companion.cr b/src/invidious/routes/companion.cr
|
||||||
index 11c2e3f5..edb53cbf 100644
|
index 949b213f..c435281a 100644
|
||||||
--- a/src/invidious/routes/companion.cr
|
--- a/src/invidious/routes/companion.cr
|
||||||
+++ b/src/invidious/routes/companion.cr
|
+++ b/src/invidious/routes/companion.cr
|
||||||
@@ -1,13 +1,15 @@
|
@@ -1,13 +1,15 @@
|
||||||
module Invidious::Routes::Companion
|
module Invidious::Routes::Companion
|
||||||
# /companion
|
# GET /companion
|
||||||
def self.get_companion(env)
|
def self.get_companion(env)
|
||||||
+ current_companion = env.get("current_companion").as(Int32)
|
+ current_companion = env.get("current_companion").as(Int32)
|
||||||
+
|
+
|
||||||
@@ -338,8 +338,25 @@ index 11c2e3f5..edb53cbf 100644
|
|||||||
wrapper.client.get(url, env.request.headers) do |resp|
|
wrapper.client.get(url, env.request.headers) do |resp|
|
||||||
return self.proxy_companion(env, resp)
|
return self.proxy_companion(env, resp)
|
||||||
end
|
end
|
||||||
@@ -17,13 +19,15 @@ module Invidious::Routes::Companion
|
@@ -18,13 +20,15 @@ module Invidious::Routes::Companion
|
||||||
end
|
|
||||||
|
# POST /companion
|
||||||
|
def self.post_companion(env)
|
||||||
|
+ current_companion = env.get("current_companion").as(Int32)
|
||||||
|
+
|
||||||
|
url = env.request.path
|
||||||
|
if env.request.query
|
||||||
|
url += "?#{env.request.query}"
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
- COMPANION_POOL.client do |wrapper|
|
||||||
|
+ COMPANION_POOL[current_companion].client do |wrapper|
|
||||||
|
wrapper.client.post(url, env.request.headers, env.request.body) do |resp|
|
||||||
|
return self.proxy_companion(env, resp)
|
||||||
|
end
|
||||||
|
@@ -35,13 +39,15 @@ module Invidious::Routes::Companion
|
||||||
|
|
||||||
|
|
||||||
def self.options_companion(env)
|
def self.options_companion(env)
|
||||||
+ current_companion = env.get("current_companion").as(Int32)
|
+ current_companion = env.get("current_companion").as(Int32)
|
||||||
@@ -356,10 +373,10 @@ index 11c2e3f5..edb53cbf 100644
|
|||||||
return self.proxy_companion(env, resp)
|
return self.proxy_companion(env, resp)
|
||||||
end
|
end
|
||||||
diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr
|
diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr
|
||||||
index 8a4fa246..2a7c2d02 100644
|
index 4c181503..4fec69ea 100644
|
||||||
--- a/src/invidious/routes/watch.cr
|
--- a/src/invidious/routes/watch.cr
|
||||||
+++ b/src/invidious/routes/watch.cr
|
+++ b/src/invidious/routes/watch.cr
|
||||||
@@ -52,7 +52,7 @@ module Invidious::Routes::Watch
|
@@ -51,7 +51,7 @@ module Invidious::Routes::Watch
|
||||||
env.params.query.delete_all("listen")
|
env.params.query.delete_all("listen")
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@@ -369,7 +386,7 @@ index 8a4fa246..2a7c2d02 100644
|
|||||||
LOGGER.error("get_video not found: #{id} : #{ex.message}")
|
LOGGER.error("get_video not found: #{id} : #{ex.message}")
|
||||||
return error_template(404, ex)
|
return error_template(404, ex)
|
||||||
diff --git a/src/invidious/routing.cr b/src/invidious/routing.cr
|
diff --git a/src/invidious/routing.cr b/src/invidious/routing.cr
|
||||||
index a51bb4b6..a0cd20ca 100644
|
index 32e8554c..2ed3a8f2 100644
|
||||||
--- a/src/invidious/routing.cr
|
--- a/src/invidious/routing.cr
|
||||||
+++ b/src/invidious/routing.cr
|
+++ b/src/invidious/routing.cr
|
||||||
@@ -21,6 +21,7 @@ module Invidious::Routing
|
@@ -21,6 +21,7 @@ module Invidious::Routing
|
||||||
@@ -412,7 +429,7 @@ index 654efc15..50caffef 100644
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
|
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
|
||||||
index 348a0a66..404f5fed 100644
|
index 0446922f..9d70ecb5 100644
|
||||||
--- a/src/invidious/videos.cr
|
--- a/src/invidious/videos.cr
|
||||||
+++ b/src/invidious/videos.cr
|
+++ b/src/invidious/videos.cr
|
||||||
@@ -294,7 +294,7 @@ struct Video
|
@@ -294,7 +294,7 @@ struct Video
|
||||||
@@ -454,46 +471,40 @@ index 348a0a66..404f5fed 100644
|
|||||||
+def fetch_video(id, region, env)
|
+def fetch_video(id, region, env)
|
||||||
info = extract_video_info(video_id: id)
|
info = extract_video_info(video_id: id)
|
||||||
|
|
||||||
if reason = info["reason"]?
|
if info.nil?
|
||||||
diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr
|
diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr
|
||||||
index 6b1dedd6..a880be1e 100644
|
index 8114ad68..e263842f 100644
|
||||||
--- a/src/invidious/videos/parser.cr
|
--- a/src/invidious/videos/parser.cr
|
||||||
+++ b/src/invidious/videos/parser.cr
|
+++ b/src/invidious/videos/parser.cr
|
||||||
@@ -58,7 +58,7 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)?
|
@@ -52,9 +52,9 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)?
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
-def extract_video_info(video_id : String)
|
-def extract_video_info(video_id : String)
|
||||||
+def extract_video_info(video_id : String, env : HTTP::Server::Context | Nil = nil)
|
+def extract_video_info(video_id : String, env : HTTP::Server::Context | Nil = nil)
|
||||||
# Init client config for the API
|
# Fetch data from the player endpoint
|
||||||
client_config = YoutubeAPI::ClientConfig.new
|
- player_response = YoutubeAPI.player(video_id: video_id)
|
||||||
|
+ player_response = YoutubeAPI.player(video_id: video_id, env: env)
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ def extract_video_info(video_id : String)
|
if player_response.nil?
|
||||||
players_fallback.each do |player_fallback|
|
return nil
|
||||||
client_config.client_type = player_fallback
|
@@ -131,9 +131,9 @@ def extract_video_info(video_id : String)
|
||||||
|
|
||||||
- next if !(player_fallback_response = try_fetch_streaming_data(video_id, client_config))
|
|
||||||
+ next if !(player_fallback_response = try_fetch_streaming_data(video_id, client_config, env))
|
|
||||||
|
|
||||||
adaptive_formats = player_fallback_response.dig?("streamingData", "adaptiveFormats")
|
|
||||||
if adaptive_formats && (adaptive_formats.dig?(0, "url") || adaptive_formats.dig?(0, "signatureCipher"))
|
|
||||||
@@ -167,9 +167,9 @@ def extract_video_info(video_id : String)
|
|
||||||
return params
|
return params
|
||||||
end
|
end
|
||||||
|
|
||||||
-def try_fetch_streaming_data(id : String, client_config : YoutubeAPI::ClientConfig) : Hash(String, JSON::Any)?
|
-def try_fetch_streaming_data(id : String, client_config : YoutubeAPI::ClientConfig) : Hash(String, JSON::Any)?
|
||||||
+def try_fetch_streaming_data(id : String, client_config : YoutubeAPI::ClientConfig, env : HTTP::Server::Context | Nil = nil) : Hash(String, JSON::Any)?
|
+def try_fetch_streaming_data(id : String, client_config : YoutubeAPI::ClientConfig, env : HTTP::Server::Context | Nil = nil) : Hash(String, JSON::Any)?
|
||||||
LOGGER.debug("try_fetch_streaming_data: [#{id}] Using #{client_config.client_type} client.")
|
LOGGER.debug("try_fetch_streaming_data: [#{id}] Using #{client_config.client_type} client.")
|
||||||
- response = YoutubeAPI.player(video_id: id, params: "2AMB", client_config: client_config)
|
- response = YoutubeAPI.player(video_id: id)
|
||||||
+ response = YoutubeAPI.player(video_id: id, params: "2AMB", client_config: client_config, env: env)
|
+ response = YoutubeAPI.player(video_id: id, env: env)
|
||||||
|
|
||||||
playability_status = response["playabilityStatus"]["status"]
|
playability_status = response["playabilityStatus"]["status"]
|
||||||
LOGGER.debug("try_fetch_streaming_data: [#{id}] Got playabilityStatus == #{playability_status}.")
|
LOGGER.debug("try_fetch_streaming_data: [#{id}] Got playabilityStatus == #{playability_status}.")
|
||||||
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
|
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
|
||||||
index 9904b4fc..9c203f76 100644
|
index df83aab2..bea5a939 100644
|
||||||
--- a/src/invidious/views/template.ecr
|
--- a/src/invidious/views/template.ecr
|
||||||
+++ b/src/invidious/views/template.ecr
|
+++ b/src/invidious/views/template.ecr
|
||||||
@@ -104,6 +104,37 @@
|
@@ -105,6 +105,37 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -574,27 +585,27 @@ index 42241d15..32780921 100644
|
|||||||
response = yield wrapper
|
response = yield wrapper
|
||||||
ensure
|
ensure
|
||||||
diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr
|
diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr
|
||||||
index 6fa8ae0e..dc860a5a 100644
|
index dd709920..aab7a979 100644
|
||||||
--- a/src/invidious/yt_backend/youtube_api.cr
|
--- a/src/invidious/yt_backend/youtube_api.cr
|
||||||
+++ b/src/invidious/yt_backend/youtube_api.cr
|
+++ b/src/invidious/yt_backend/youtube_api.cr
|
||||||
@@ -471,6 +471,7 @@ module YoutubeAPI
|
@@ -454,14 +454,14 @@ module YoutubeAPI
|
||||||
*, # Force the following parameters to be passed by name
|
#
|
||||||
params : String,
|
# The requested data is a video ID (`v=` parameter).
|
||||||
client_config : ClientConfig | Nil = nil,
|
#
|
||||||
+ env : HTTP::Server::Context | Nil = nil,
|
- def player(video_id : String)
|
||||||
)
|
+ def player(video_id : String, env : HTTP::Server::Context | Nil)
|
||||||
# Playback context, separate because it can be different between clients
|
# JSON Request data, required by Invidious Companion
|
||||||
playback_ctx = {
|
data = {
|
||||||
@@ -507,7 +508,7 @@ module YoutubeAPI
|
"videoId" => video_id,
|
||||||
end
|
}
|
||||||
|
|
||||||
if CONFIG.invidious_companion.present?
|
if CONFIG.invidious_companion.present?
|
||||||
- return self._post_invidious_companion("/youtubei/v1/player", data)
|
- return self._post_invidious_companion("/youtubei/v1/player", data)
|
||||||
+ return self._post_invidious_companion("/youtubei/v1/player", data, env)
|
+ return self._post_invidious_companion("/youtubei/v1/player", data, env)
|
||||||
else
|
else
|
||||||
return self._post_json("/youtubei/v1/player", data, client_config)
|
return nil
|
||||||
end
|
end
|
||||||
@@ -688,6 +689,7 @@ module YoutubeAPI
|
@@ -638,6 +638,7 @@ module YoutubeAPI
|
||||||
def _post_invidious_companion(
|
def _post_invidious_companion(
|
||||||
endpoint : String,
|
endpoint : String,
|
||||||
data : Hash,
|
data : Hash,
|
||||||
@@ -602,7 +613,7 @@ index 6fa8ae0e..dc860a5a 100644
|
|||||||
) : Hash(String, JSON::Any)
|
) : Hash(String, JSON::Any)
|
||||||
headers = HTTP::Headers{
|
headers = HTTP::Headers{
|
||||||
"Content-Type" => "application/json; charset=UTF-8",
|
"Content-Type" => "application/json; charset=UTF-8",
|
||||||
@@ -701,9 +703,15 @@ module YoutubeAPI
|
@@ -651,9 +652,15 @@ module YoutubeAPI
|
||||||
# Send the POST request
|
# Send the POST request
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@@ -619,7 +630,7 @@ index 6fa8ae0e..dc860a5a 100644
|
|||||||
companion_base_url = wrapper.companion.private_url.path
|
companion_base_url = wrapper.companion.private_url.path
|
||||||
|
|
||||||
wrapper.client.post("#{companion_base_url}#{endpoint}", headers: headers, body: data.to_json) do |response|
|
wrapper.client.post("#{companion_base_url}#{endpoint}", headers: headers, body: data.to_json) do |response|
|
||||||
@@ -735,7 +743,7 @@ module YoutubeAPI
|
@@ -685,7 +692,7 @@ module YoutubeAPI
|
||||||
# Multiple encodings can be combined, and are listed in the order
|
# Multiple encodings can be combined, and are listed in the order
|
||||||
# in which they were applied. E.g: "deflate, gzip" means that the
|
# in which they were applied. E.g: "deflate, gzip" means that the
|
||||||
# content must be first "gunzipped", then "defated".
|
# content must be first "gunzipped", then "defated".
|
||||||
+7
-6
@@ -1,12 +1,12 @@
|
|||||||
From 5626e7230e72356834bc5568249d2f744852ee28 Mon Sep 17 00:00:00 2001
|
From a8ef3fd6a65a34f8488377604ba5bf8799d46dbb Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:35:20 +0200
|
Date: Sat, 20 Dec 2025 11:27:06 +0100
|
||||||
Subject: [PATCH 04/18] [Patch] - 004 hide feed views
|
Subject: [PATCH 03/16] Hide feeds videos view count
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/views/components/item.ecr | 6 ------
|
src/invidious/views/components/item.ecr | 6 ------
|
||||||
src/invidious/views/watch.ecr | 8 --------
|
src/invidious/views/watch.ecr | 7 -------
|
||||||
2 files changed, 14 deletions(-)
|
2 files changed, 13 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/invidious/views/components/item.ecr b/src/invidious/views/components/item.ecr
|
diff --git a/src/invidious/views/components/item.ecr b/src/invidious/views/components/item.ecr
|
||||||
index a24423df..d91d345e 100644
|
index a24423df..d91d345e 100644
|
||||||
@@ -26,7 +26,7 @@ index a24423df..d91d345e 100644
|
|||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
|
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
|
||||||
index 89632dc5..b0002911 100644
|
index 923c2a83..7ad4660e 100644
|
||||||
--- a/src/invidious/views/watch.ecr
|
--- a/src/invidious/views/watch.ecr
|
||||||
+++ b/src/invidious/views/watch.ecr
|
+++ b/src/invidious/views/watch.ecr
|
||||||
@@ -352,13 +352,6 @@ we're going to need to do it here in order to allow for translations.
|
@@ -352,13 +352,6 @@ we're going to need to do it here in order to allow for translations.
|
||||||
@@ -43,5 +43,6 @@ index 89632dc5..b0002911 100644
|
|||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
--
|
||||||
2.39.5
|
2.39.5
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From a510c0d4a3fb74530bd5d752db340a2a43e9ff39 Mon Sep 17 00:00:00 2001
|
From 61ed630e0f16af987fb82e8c3baca0b39a656474 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:35:54 +0200
|
Date: Sat, 20 Dec 2025 11:27:16 +0100
|
||||||
Subject: [PATCH 05/18] [Patch] - 005 donation page
|
Subject: [PATCH 04/16] Donation page
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/routes/misc.cr | 5 +++++
|
src/invidious/routes/misc.cr | 5 +++++
|
||||||
@@ -27,7 +27,7 @@ index 0b868755..15f714f3 100644
|
|||||||
locale = env.get("preferences").as(Preferences).locale
|
locale = env.get("preferences").as(Preferences).locale
|
||||||
rendered "licenses"
|
rendered "licenses"
|
||||||
diff --git a/src/invidious/routing.cr b/src/invidious/routing.cr
|
diff --git a/src/invidious/routing.cr b/src/invidious/routing.cr
|
||||||
index a0cd20ca..6e197c70 100644
|
index 2ed3a8f2..623493f4 100644
|
||||||
--- a/src/invidious/routing.cr
|
--- a/src/invidious/routing.cr
|
||||||
+++ b/src/invidious/routing.cr
|
+++ b/src/invidious/routing.cr
|
||||||
@@ -18,6 +18,7 @@ module Invidious::Routing
|
@@ -18,6 +18,7 @@ module Invidious::Routing
|
||||||
+4
-4
@@ -1,14 +1,14 @@
|
|||||||
From db574f160de1866ad0b3a803f16db9ebd2972c6e Mon Sep 17 00:00:00 2001
|
From 57ce1ebd3bdc7594e41e4bae88fe6d9be5955da9 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:36:30 +0200
|
Date: Sat, 20 Dec 2025 11:27:24 +0100
|
||||||
Subject: [PATCH 06/18] [Patch] - 006 range reader improvement
|
Subject: [PATCH 05/16] Range header improvement
|
||||||
|
|
||||||
---
|
---
|
||||||
assets/js/player.js | 6 ++++++
|
assets/js/player.js | 6 ++++++
|
||||||
1 file changed, 6 insertions(+)
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
diff --git a/assets/js/player.js b/assets/js/player.js
|
diff --git a/assets/js/player.js b/assets/js/player.js
|
||||||
index 10870915..b086aa50 100644
|
index ecdc0448..d5eafe2c 100644
|
||||||
--- a/assets/js/player.js
|
--- a/assets/js/player.js
|
||||||
+++ b/assets/js/player.js
|
+++ b/assets/js/player.js
|
||||||
@@ -46,6 +46,12 @@ embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
|
@@ -46,6 +46,12 @@ embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
|
||||||
+7
-7
@@ -1,7 +1,7 @@
|
|||||||
From 1327cf3e5b270901759c62c8ba88e3259465de57 Mon Sep 17 00:00:00 2001
|
From 3f19046c4766e145235ec3bde35ecf358cda7a6d Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:36:57 +0200
|
Date: Sat, 20 Dec 2025 11:27:31 +0100
|
||||||
Subject: [PATCH 07/18] [Patch] - 007 redis for video cache
|
Subject: [PATCH 06/16] Redis for video cache
|
||||||
|
|
||||||
---
|
---
|
||||||
shard.lock | 8 ++++++++
|
shard.lock | 8 ++++++++
|
||||||
@@ -39,7 +39,7 @@ index 1265eda6..c210a465 100644
|
|||||||
git: https://github.com/icy-arctic-fox/spectator.git
|
git: https://github.com/icy-arctic-fox/spectator.git
|
||||||
version: 0.10.6
|
version: 0.10.6
|
||||||
diff --git a/shard.yml b/shard.yml
|
diff --git a/shard.yml b/shard.yml
|
||||||
index 4dc8aa02..2e9bfaf6 100644
|
index bc6c4bf4..710c7ca6 100644
|
||||||
--- a/shard.yml
|
--- a/shard.yml
|
||||||
+++ b/shard.yml
|
+++ b/shard.yml
|
||||||
@@ -27,6 +27,8 @@ dependencies:
|
@@ -27,6 +27,8 @@ dependencies:
|
||||||
@@ -52,7 +52,7 @@ index 4dc8aa02..2e9bfaf6 100644
|
|||||||
development_dependencies:
|
development_dependencies:
|
||||||
spectator:
|
spectator:
|
||||||
diff --git a/src/invidious.cr b/src/invidious.cr
|
diff --git a/src/invidious.cr b/src/invidious.cr
|
||||||
index a75260cc..1426855c 100644
|
index 8e0d2c1f..0ab3b1ba 100644
|
||||||
--- a/src/invidious.cr
|
--- a/src/invidious.cr
|
||||||
+++ b/src/invidious.cr
|
+++ b/src/invidious.cr
|
||||||
@@ -30,6 +30,7 @@ require "xml"
|
@@ -30,6 +30,7 @@ require "xml"
|
||||||
@@ -75,7 +75,7 @@ index a75260cc..1426855c 100644
|
|||||||
DB.open CONFIG.database_url
|
DB.open CONFIG.database_url
|
||||||
rescue ex
|
rescue ex
|
||||||
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
||||||
index 49903f68..9e641156 100644
|
index f3321aff..0d7a962b 100644
|
||||||
--- a/src/invidious/config.cr
|
--- a/src/invidious/config.cr
|
||||||
+++ b/src/invidious/config.cr
|
+++ b/src/invidious/config.cr
|
||||||
@@ -113,6 +113,11 @@ class Config
|
@@ -113,6 +113,11 @@ class Config
|
||||||
@@ -131,7 +131,7 @@ index 695f5b33..776ef5b1 100644
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
|
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
|
||||||
index 404f5fed..8fad59fe 100644
|
index 9d70ecb5..48c62909 100644
|
||||||
--- a/src/invidious/videos.cr
|
--- a/src/invidious/videos.cr
|
||||||
+++ b/src/invidious/videos.cr
|
+++ b/src/invidious/videos.cr
|
||||||
@@ -305,7 +305,7 @@ def get_video(id, refresh = true, region = nil, force_refresh = false, env : HTT
|
@@ -305,7 +305,7 @@ def get_video(id, refresh = true, region = nil, force_refresh = false, env : HTT
|
||||||
+9
-9
@@ -1,7 +1,7 @@
|
|||||||
From 924edbdb101785c9a6d4df30240f20f9f1c331f6 Mon Sep 17 00:00:00 2001
|
From 92ed10ab9f917a4de97d877807b36873a4306c41 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:37:20 +0200
|
Date: Sat, 20 Dec 2025 11:27:38 +0100
|
||||||
Subject: [PATCH 08/18] [Patch] - 008 remove psql materialized views
|
Subject: [PATCH 07/16] Remove PSQL materialized views
|
||||||
|
|
||||||
---
|
---
|
||||||
config/migrate-scripts/migrate-db-8bc91ce.sh | 6 ++
|
config/migrate-scripts/migrate-db-8bc91ce.sh | 6 ++
|
||||||
@@ -52,10 +52,10 @@ index cd4e0ffd..f2ac4876 100644
|
|||||||
+ (ucid COLLATE pg_catalog."default", published);
|
+ (ucid COLLATE pg_catalog."default", published);
|
||||||
|
|
||||||
diff --git a/src/invidious.cr b/src/invidious.cr
|
diff --git a/src/invidious.cr b/src/invidious.cr
|
||||||
index 1426855c..93367bce 100644
|
index 0ab3b1ba..8d75db56 100644
|
||||||
--- a/src/invidious.cr
|
--- a/src/invidious.cr
|
||||||
+++ b/src/invidious.cr
|
+++ b/src/invidious.cr
|
||||||
@@ -124,14 +124,6 @@ Kemal.config.extra_options do |parser|
|
@@ -125,14 +125,6 @@ Kemal.config.extra_options do |parser|
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -70,7 +70,7 @@ index 1426855c..93367bce 100644
|
|||||||
parser.on("-o OUTPUT", "--output=OUTPUT", "Redirect output (default: #{CONFIG.output})") do |output|
|
parser.on("-o OUTPUT", "--output=OUTPUT", "Redirect output (default: #{CONFIG.output})") do |output|
|
||||||
CONFIG.output = output
|
CONFIG.output = output
|
||||||
end
|
end
|
||||||
@@ -192,10 +184,6 @@ if CONFIG.channel_threads > 0
|
@@ -184,10 +176,6 @@ if CONFIG.channel_threads > 0
|
||||||
Invidious::Jobs.register Invidious::Jobs::RefreshChannelsJob.new(PG_DB)
|
Invidious::Jobs.register Invidious::Jobs::RefreshChannelsJob.new(PG_DB)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ index 1426855c..93367bce 100644
|
|||||||
Invidious::Jobs.register Invidious::Jobs::StatisticsRefreshJob.new(PG_DB, SOFTWARE)
|
Invidious::Jobs.register Invidious::Jobs::StatisticsRefreshJob.new(PG_DB, SOFTWARE)
|
||||||
end
|
end
|
||||||
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
||||||
index 9e641156..7e09affa 100644
|
index 0d7a962b..daefb999 100644
|
||||||
--- a/src/invidious/config.cr
|
--- a/src/invidious/config.cr
|
||||||
+++ b/src/invidious/config.cr
|
+++ b/src/invidious/config.cr
|
||||||
@@ -96,8 +96,6 @@ class Config
|
@@ -96,8 +96,6 @@ class Config
|
||||||
@@ -191,10 +191,10 @@ index c8db207c..705924db 100644
|
|||||||
env.request.cookies.each do |cookie|
|
env.request.cookies.each do |cookie|
|
||||||
cookie.expires = Time.utc(1990, 1, 1)
|
cookie.expires = Time.utc(1990, 1, 1)
|
||||||
diff --git a/src/invidious/routes/login.cr b/src/invidious/routes/login.cr
|
diff --git a/src/invidious/routes/login.cr b/src/invidious/routes/login.cr
|
||||||
index e7de5018..c4c97f9b 100644
|
index 674f0a46..1748c9cc 100644
|
||||||
--- a/src/invidious/routes/login.cr
|
--- a/src/invidious/routes/login.cr
|
||||||
+++ b/src/invidious/routes/login.cr
|
+++ b/src/invidious/routes/login.cr
|
||||||
@@ -118,9 +118,6 @@ module Invidious::Routes::Login
|
@@ -120,9 +120,6 @@ module Invidious::Routes::Login
|
||||||
Invidious::Database::Users.insert(user)
|
Invidious::Database::Users.insert(user)
|
||||||
Invidious::Database::SessionIDs.insert(sid, email)
|
Invidious::Database::SessionIDs.insert(sid, email)
|
||||||
|
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From a5e37134c99006fdb10c8075e43ac9cb9ef2df97 Mon Sep 17 00:00:00 2001
|
From 1e8c0c34c45efdd192396476d76b4880d9d9f5eb Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:38:01 +0200
|
Date: Sat, 20 Dec 2025 11:27:47 +0100
|
||||||
Subject: [PATCH 09/18] [Patch] - 009 increase yt db pool timeouts
|
Subject: [PATCH 08/16] Increase YT DB pool timeout
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/yt_backend/connection_pool.cr | 2 +-
|
src/invidious/yt_backend/connection_pool.cr | 2 +-
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From 1a69154f49bb76eb3f342d5c4a6b697428f2647d Mon Sep 17 00:00:00 2001
|
From 570adb966fb7966eda66ca8af16ddaa82b58fbf7 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:43:35 +0200
|
Date: Sat, 20 Dec 2025 11:27:57 +0100
|
||||||
Subject: [PATCH 10/18] [Patch] - 010 rewrite yt blocked messages
|
Subject: [PATCH 09/16] Rephrase YT API/blocked error messages
|
||||||
|
|
||||||
---
|
---
|
||||||
locales/ar.json | 12 +++-
|
locales/ar.json | 12 +++-
|
||||||
@@ -211,10 +211,10 @@ index 396400a0..8a43a601 100644
|
|||||||
"footer_donate_page": "Δωρεά",
|
"footer_donate_page": "Δωρεά",
|
||||||
"footer_original_source_code": "Πρωτότυπος πηγαίος κώδικας",
|
"footer_original_source_code": "Πρωτότυπος πηγαίος κώδικας",
|
||||||
diff --git a/locales/en-US.json b/locales/en-US.json
|
diff --git a/locales/en-US.json b/locales/en-US.json
|
||||||
index eb2c15ec..cf8b3a2f 100644
|
index 55714b50..5ef3b058 100644
|
||||||
--- a/locales/en-US.json
|
--- a/locales/en-US.json
|
||||||
+++ b/locales/en-US.json
|
+++ b/locales/en-US.json
|
||||||
@@ -461,7 +461,17 @@
|
@@ -462,7 +462,17 @@
|
||||||
"search_filters_sort_option_views": "View count",
|
"search_filters_sort_option_views": "View count",
|
||||||
"search_filters_apply_button": "Apply selected filters",
|
"search_filters_apply_button": "Apply selected filters",
|
||||||
"Current version: ": "Current version: ",
|
"Current version: ": "Current version: ",
|
||||||
+5
-5
@@ -1,17 +1,17 @@
|
|||||||
From e1685894b13382c6e4bd2b21a3cccea3ce67db88 Mon Sep 17 00:00:00 2001
|
From 2bdbbe7342487ea52bfc91f5fcc23df7bf31b7b4 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:44:14 +0200
|
Date: Sat, 20 Dec 2025 11:28:06 +0100
|
||||||
Subject: [PATCH 11/18] [Patch] - 011 change yt status codes
|
Subject: [PATCH 10/16] Change YT API error code message
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/yt_backend/youtube_api.cr | 4 +---
|
src/invidious/yt_backend/youtube_api.cr | 4 +---
|
||||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr
|
diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr
|
||||||
index 6a07c6fb..8fa8113b 100644
|
index aab7a979..1614272f 100644
|
||||||
--- a/src/invidious/yt_backend/youtube_api.cr
|
--- a/src/invidious/yt_backend/youtube_api.cr
|
||||||
+++ b/src/invidious/yt_backend/youtube_api.cr
|
+++ b/src/invidious/yt_backend/youtube_api.cr
|
||||||
@@ -649,9 +649,7 @@ module YoutubeAPI
|
@@ -598,9 +598,7 @@ module YoutubeAPI
|
||||||
body = YT_POOL.client() do |client|
|
body = YT_POOL.client() do |client|
|
||||||
client.post(url, headers: headers, body: data.to_json) do |response|
|
client.post(url, headers: headers, body: data.to_json) do |response|
|
||||||
if response.status_code != 200
|
if response.status_code != 200
|
||||||
+8
-8
@@ -1,7 +1,7 @@
|
|||||||
From f6ebca164367ee61c4be5e6c5c451196890548d8 Mon Sep 17 00:00:00 2001
|
From f87057ba75d3aa215982a7f0138b91797e870c9a Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:44:37 +0200
|
Date: Sat, 20 Dec 2025 11:28:15 +0100
|
||||||
Subject: [PATCH 12/18] [Patch] - 012 hide shorts feature
|
Subject: [PATCH 11/16] Hide shorts feature
|
||||||
|
|
||||||
---
|
---
|
||||||
locales/ar.json | 1 +
|
locales/ar.json | 1 +
|
||||||
@@ -185,7 +185,7 @@ index 8a43a601..1a9c44f3 100644
|
|||||||
"search_filters_title": "Φίλτρο",
|
"search_filters_title": "Φίλτρο",
|
||||||
"search_message_no_results": "Δε βρέθηκαν αποτελέσματα.",
|
"search_message_no_results": "Δε βρέθηκαν αποτελέσματα.",
|
||||||
diff --git a/locales/en-US.json b/locales/en-US.json
|
diff --git a/locales/en-US.json b/locales/en-US.json
|
||||||
index cf8b3a2f..e20f05bd 100644
|
index 5ef3b058..7a563808 100644
|
||||||
--- a/locales/en-US.json
|
--- a/locales/en-US.json
|
||||||
+++ b/locales/en-US.json
|
+++ b/locales/en-US.json
|
||||||
@@ -76,6 +76,7 @@
|
@@ -76,6 +76,7 @@
|
||||||
@@ -701,7 +701,7 @@ index 16d99ebd..1fbf4676 100644
|
|||||||
"search_message_change_filters_or_query": "嘗試擴大您的查詢字詞與/或變更過濾條件。",
|
"search_message_change_filters_or_query": "嘗試擴大您的查詢字詞與/或變更過濾條件。",
|
||||||
"search_filters_apply_button": "套用選定的過濾條件",
|
"search_filters_apply_button": "套用選定的過濾條件",
|
||||||
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
||||||
index 7e09affa..2336e7b8 100644
|
index daefb999..dfd66f16 100644
|
||||||
--- a/src/invidious/config.cr
|
--- a/src/invidious/config.cr
|
||||||
+++ b/src/invidious/config.cr
|
+++ b/src/invidious/config.cr
|
||||||
@@ -31,6 +31,7 @@ struct ConfigPreferences
|
@@ -31,6 +31,7 @@ struct ConfigPreferences
|
||||||
@@ -713,10 +713,10 @@ index 7e09affa..2336e7b8 100644
|
|||||||
property max_results : Int32 = 40
|
property max_results : Int32 = 40
|
||||||
property notifications_only : Bool = false
|
property notifications_only : Bool = false
|
||||||
diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr
|
diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr
|
||||||
index 9936e523..ee4326be 100644
|
index d9fad1b1..ef96af51 100644
|
||||||
--- a/src/invidious/routes/preferences.cr
|
--- a/src/invidious/routes/preferences.cr
|
||||||
+++ b/src/invidious/routes/preferences.cr
|
+++ b/src/invidious/routes/preferences.cr
|
||||||
@@ -140,6 +140,10 @@ module Invidious::Routes::PreferencesRoute
|
@@ -139,6 +139,10 @@ module Invidious::Routes::PreferencesRoute
|
||||||
unseen_only ||= "off"
|
unseen_only ||= "off"
|
||||||
unseen_only = unseen_only == "on"
|
unseen_only = unseen_only == "on"
|
||||||
|
|
||||||
@@ -727,7 +727,7 @@ index 9936e523..ee4326be 100644
|
|||||||
notifications_only = env.params.body["notifications_only"]?.try &.as(String)
|
notifications_only = env.params.body["notifications_only"]?.try &.as(String)
|
||||||
notifications_only ||= "off"
|
notifications_only ||= "off"
|
||||||
notifications_only = notifications_only == "on"
|
notifications_only = notifications_only == "on"
|
||||||
@@ -176,6 +180,7 @@ module Invidious::Routes::PreferencesRoute
|
@@ -175,6 +179,7 @@ module Invidious::Routes::PreferencesRoute
|
||||||
speed: speed,
|
speed: speed,
|
||||||
thin_mode: thin_mode,
|
thin_mode: thin_mode,
|
||||||
unseen_only: unseen_only,
|
unseen_only: unseen_only,
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From e8a007129b5b7f733c63a5078eabef06862286e1 Mon Sep 17 00:00:00 2001
|
From 6debc8c29457d67ee0c75ecab40d189ce4f0549a Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:45:12 +0200
|
Date: Sat, 20 Dec 2025 11:28:23 +0100
|
||||||
Subject: [PATCH 13/18] [Patch] - 013 add feeds menu to all pages
|
Subject: [PATCH 12/16] Add feed menu to all pages
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/views/channel.ecr | 2 ++
|
src/invidious/views/channel.ecr | 2 ++
|
||||||
@@ -36,10 +36,10 @@ index c27ddba6..0c0e1e27 100644
|
|||||||
<div class="flex-left"><h3><%= title %></h3></div>
|
<div class="flex-left"><h3><%= title %></h3></div>
|
||||||
|
|
||||||
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
|
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
|
||||||
index b41274a8..ec48b4e2 100644
|
index 7ad4660e..c422a78b 100644
|
||||||
--- a/src/invidious/views/watch.ecr
|
--- a/src/invidious/views/watch.ecr
|
||||||
+++ b/src/invidious/views/watch.ecr
|
+++ b/src/invidious/views/watch.ecr
|
||||||
@@ -70,6 +70,8 @@ we're going to need to do it here in order to allow for translations.
|
@@ -71,6 +71,8 @@ we're going to need to do it here in order to allow for translations.
|
||||||
%>
|
%>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
+8
-8
@@ -1,7 +1,7 @@
|
|||||||
From ed624b624a3348fc0c3a8532eb6a26128ae0a063 Mon Sep 17 00:00:00 2001
|
From 0cf0f1aeb0d3e9c8194174c2e7d4a3564a975238 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:45:35 +0200
|
Date: Sat, 20 Dec 2025 11:28:32 +0100
|
||||||
Subject: [PATCH 14/18] [Patch] - 014 backend health status page
|
Subject: [PATCH 13/16] Backends health status page
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/config.cr | 4 ++++
|
src/invidious/config.cr | 4 ++++
|
||||||
@@ -10,10 +10,10 @@ Subject: [PATCH 14/18] [Patch] - 014 backend health status page
|
|||||||
3 files changed, 18 insertions(+), 1 deletion(-)
|
3 files changed, 18 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
||||||
index 2336e7b8..d108e0e7 100644
|
index dfd66f16..c027317c 100644
|
||||||
--- a/src/invidious/config.cr
|
--- a/src/invidious/config.cr
|
||||||
+++ b/src/invidious/config.cr
|
+++ b/src/invidious/config.cr
|
||||||
@@ -200,6 +200,10 @@ class Config
|
@@ -192,6 +192,10 @@ class Config
|
||||||
property check_backends_interval : Int32 = 30
|
property check_backends_interval : Int32 = 30
|
||||||
property backend_name_prefix : String = "Backend"
|
property backend_name_prefix : String = "Backend"
|
||||||
|
|
||||||
@@ -42,10 +42,10 @@ index f576245e..d098355d 100644
|
|||||||
+ end
|
+ end
|
||||||
end
|
end
|
||||||
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
|
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
|
||||||
index fab9a427..22500b19 100644
|
index bea5a939..13b2fa51 100644
|
||||||
--- a/src/invidious/views/template.ecr
|
--- a/src/invidious/views/template.ecr
|
||||||
+++ b/src/invidious/views/template.ecr
|
+++ b/src/invidious/views/template.ecr
|
||||||
@@ -104,6 +104,7 @@
|
@@ -105,6 +105,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ index fab9a427..22500b19 100644
|
|||||||
<%
|
<%
|
||||||
if CONFIG.invidious_companion.present?
|
if CONFIG.invidious_companion.present?
|
||||||
current_backend = env.get?("current_companion").try &.as(Int32)
|
current_backend = env.get?("current_companion").try &.as(Int32)
|
||||||
@@ -111,8 +112,12 @@
|
@@ -112,8 +113,12 @@
|
||||||
companion_switched = env.get?("companion_switched")
|
companion_switched = env.get?("companion_switched")
|
||||||
status = BackendInfo.get_status
|
status = BackendInfo.get_status
|
||||||
%>
|
%>
|
||||||
+5
-5
@@ -1,17 +1,17 @@
|
|||||||
From d1e00bc4b34ab1734f21101ad64d06a323d1d1e8 Mon Sep 17 00:00:00 2001
|
From c3b9b658ce485afff913fc0383d652aeb52041bd Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:45:58 +0200
|
Date: Sat, 20 Dec 2025 11:28:39 +0100
|
||||||
Subject: [PATCH 15/18] [Patch] - 015 disable switching to unhealthy backends
|
Subject: [PATCH 14/16] Disable unhealthy backends
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/views/template.ecr | 21 +++++++++++++--------
|
src/invidious/views/template.ecr | 21 +++++++++++++--------
|
||||||
1 file changed, 13 insertions(+), 8 deletions(-)
|
1 file changed, 13 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
|
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
|
||||||
index 22500b19..76c0d2ed 100644
|
index 13b2fa51..7ee85fcc 100644
|
||||||
--- a/src/invidious/views/template.ecr
|
--- a/src/invidious/views/template.ecr
|
||||||
+++ b/src/invidious/views/template.ecr
|
+++ b/src/invidious/views/template.ecr
|
||||||
@@ -120,15 +120,20 @@
|
@@ -121,15 +121,20 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% current_page = env.get("current_page") %>
|
<% current_page = env.get("current_page") %>
|
||||||
<% CONFIG.invidious_companion.each_with_index do | companion, index | %>
|
<% CONFIG.invidious_companion.each_with_index do | companion, index | %>
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 8d8b020167f4344061b0a2a73c08dd55dd19d8c5 Mon Sep 17 00:00:00 2001
|
From 15ecda80bd6c5b1c2c986a8c06bc00fd2d20dd48 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:46:26 +0200
|
Date: Sat, 20 Dec 2025 11:28:46 +0100
|
||||||
Subject: [PATCH 16/18] [Patch] - 016 force local proxy
|
Subject: [PATCH 15/16] Force local proxy
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/config.cr | 1 +
|
src/invidious/config.cr | 1 +
|
||||||
@@ -11,7 +11,7 @@ Subject: [PATCH 16/18] [Patch] - 016 force local proxy
|
|||||||
4 files changed, 9 insertions(+), 16 deletions(-)
|
4 files changed, 9 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
||||||
index d108e0e7..3f66b248 100644
|
index c027317c..89fe08db 100644
|
||||||
--- a/src/invidious/config.cr
|
--- a/src/invidious/config.cr
|
||||||
+++ b/src/invidious/config.cr
|
+++ b/src/invidious/config.cr
|
||||||
@@ -148,6 +148,7 @@ class Config
|
@@ -148,6 +148,7 @@ class Config
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
From bd946f9980d06ad06bc4eab3eb34371eae7e28a3 Mon Sep 17 00:00:00 2001
|
From cebaeafcd661c730953067ef48457be3e26967a7 Mon Sep 17 00:00:00 2001
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
From: weidenwiesel <webmaster@nerdvpn.de>
|
||||||
Date: Fri, 10 Oct 2025 12:46:54 +0200
|
Date: Sat, 20 Dec 2025 11:28:56 +0100
|
||||||
Subject: [PATCH 17/18] [Patch] - 017 change dash quality levels
|
Subject: [PATCH 16/16] Change DASH quality levels
|
||||||
|
|
||||||
---
|
---
|
||||||
src/invidious/views/user/preferences.ecr | 4 ++--
|
src/invidious/views/user/preferences.ecr | 4 ++--
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
From db9065c3caf90aeb23878b86ba9dab1555023c81 Mon Sep 17 00:00:00 2001
|
|
||||||
From: weidenwiesel <webmaster@nerdvpn.de>
|
|
||||||
Date: Fri, 10 Oct 2025 12:47:24 +0200
|
|
||||||
Subject: [PATCH 18/18] [Patch] - 018 increase crystal request uri limit
|
|
||||||
|
|
||||||
---
|
|
||||||
src/invidious.cr | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/invidious.cr b/src/invidious.cr
|
|
||||||
index 93367bce..5ec15299 100644
|
|
||||||
--- a/src/invidious.cr
|
|
||||||
+++ b/src/invidious.cr
|
|
||||||
@@ -259,6 +259,7 @@ Kemal.config.app_name = "Invidious"
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
Kemal.run do |config|
|
|
||||||
+ config.server.not_nil!.max_request_line_size = 16384
|
|
||||||
if socket_binding = CONFIG.socket_binding
|
|
||||||
File.delete?(socket_binding.path)
|
|
||||||
# Create a socket and set its desired permissions
|
|
||||||
--
|
|
||||||
2.39.5
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user