mirror of
https://git.nerdvpn.de/NerdVPN.de/invidious
synced 2026-02-14 22:51:42 +01:00
update patch PR 2469
This commit is contained in:
+16
-32
@@ -1,6 +1,6 @@
|
||||
From a6056f6826ed1eca6d51c48c444033b338111ad4 Mon Sep 17 00:00:00 2001
|
||||
From: Emilien Devos <--global>
|
||||
Date: Fri, 23 Jun 2023 21:47:51 +0200
|
||||
From 1e6a035109316050f8bb290cefd77556ad0ae196 Mon Sep 17 00:00:00 2001
|
||||
From: Emilien Devos <4016501+unixfox@users.noreply.github.com>
|
||||
Date: Wed, 26 Jul 2023 15:43:43 +0200
|
||||
Subject: [PATCH] limit feeds and delete materialized views
|
||||
|
||||
---
|
||||
@@ -12,16 +12,15 @@ Subject: [PATCH] limit feeds and delete materialized views
|
||||
src/invidious/jobs/refresh_feeds_job.cr | 75 --------------------
|
||||
src/invidious/routes/account.cr | 2 -
|
||||
src/invidious/routes/login.cr | 3 -
|
||||
src/invidious/routes/search.cr | 2 +
|
||||
src/invidious/search/processors.cr | 18 ++---
|
||||
src/invidious/users.cr | 39 +++++-----
|
||||
11 files changed, 43 insertions(+), 125 deletions(-)
|
||||
10 files changed, 41 insertions(+), 125 deletions(-)
|
||||
create mode 100644 config/migrate-scripts/migrate-db-8bc91ce.sh
|
||||
delete mode 100644 src/invidious/jobs/refresh_feeds_job.cr
|
||||
|
||||
diff --git a/config/migrate-scripts/migrate-db-8bc91ce.sh b/config/migrate-scripts/migrate-db-8bc91ce.sh
|
||||
new file mode 100644
|
||||
index 0000000000..04388175e8
|
||||
index 000000000..04388175e
|
||||
--- /dev/null
|
||||
+++ b/config/migrate-scripts/migrate-db-8bc91ce.sh
|
||||
@@ -0,0 +1,6 @@
|
||||
@@ -33,7 +32,7 @@ index 0000000000..04388175e8
|
||||
+DROP INDEX channel_videos_ucid_idx;
|
||||
\ No newline at end of file
|
||||
diff --git a/config/sql/channel_videos.sql b/config/sql/channel_videos.sql
|
||||
index cd4e0ffdb3..f2ac4876c4 100644
|
||||
index cd4e0ffdb..f2ac4876c 100644
|
||||
--- a/config/sql/channel_videos.sql
|
||||
+++ b/config/sql/channel_videos.sql
|
||||
@@ -19,12 +19,12 @@ CREATE TABLE IF NOT EXISTS public.channel_videos
|
||||
@@ -54,7 +53,7 @@ index cd4e0ffdb3..f2ac4876c4 100644
|
||||
+ (ucid COLLATE pg_catalog."default", published);
|
||||
|
||||
diff --git a/kubernetes/values.yaml b/kubernetes/values.yaml
|
||||
index 5000c2b66e..17d69b5d7e 100644
|
||||
index 5000c2b66..17d69b5d7 100644
|
||||
--- a/kubernetes/values.yaml
|
||||
+++ b/kubernetes/values.yaml
|
||||
@@ -49,7 +49,6 @@ postgresql:
|
||||
@@ -66,10 +65,10 @@ index 5000c2b66e..17d69b5d7e 100644
|
||||
user: kemal
|
||||
password: kemal
|
||||
diff --git a/src/invidious.cr b/src/invidious.cr
|
||||
index 636e28a62b..d4548472a0 100644
|
||||
index 84e1895da..ed84a3d14 100644
|
||||
--- a/src/invidious.cr
|
||||
+++ b/src/invidious.cr
|
||||
@@ -104,14 +104,6 @@ Kemal.config.extra_options do |parser|
|
||||
@@ -103,14 +103,6 @@ Kemal.config.extra_options do |parser|
|
||||
exit
|
||||
end
|
||||
end
|
||||
@@ -84,7 +83,7 @@ index 636e28a62b..d4548472a0 100644
|
||||
parser.on("-o OUTPUT", "--output=OUTPUT", "Redirect output (default: #{CONFIG.output})") do |output|
|
||||
CONFIG.output = output
|
||||
end
|
||||
@@ -160,10 +152,6 @@ if CONFIG.channel_threads > 0
|
||||
@@ -159,10 +151,6 @@ if CONFIG.channel_threads > 0
|
||||
Invidious::Jobs.register Invidious::Jobs::RefreshChannelsJob.new(PG_DB)
|
||||
end
|
||||
|
||||
@@ -96,7 +95,7 @@ index 636e28a62b..d4548472a0 100644
|
||||
if CONFIG.decrypt_polling
|
||||
Invidious::Jobs.register Invidious::Jobs::UpdateDecryptFunctionJob.new
|
||||
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
|
||||
index 9fc584097e..88c53f3de7 100644
|
||||
index e5f1e8222..6fd1c3e43 100644
|
||||
--- a/src/invidious/config.cr
|
||||
+++ b/src/invidious/config.cr
|
||||
@@ -62,8 +62,6 @@ class Config
|
||||
@@ -110,7 +109,7 @@ index 9fc584097e..88c53f3de7 100644
|
||||
# Default log level, valid YAML values are ints and strings, see src/invidious/helpers/logger.cr
|
||||
diff --git a/src/invidious/jobs/refresh_feeds_job.cr b/src/invidious/jobs/refresh_feeds_job.cr
|
||||
deleted file mode 100644
|
||||
index 4f8130dfd0..0000000000
|
||||
index 4f8130dfd..000000000
|
||||
--- a/src/invidious/jobs/refresh_feeds_job.cr
|
||||
+++ /dev/null
|
||||
@@ -1,75 +0,0 @@
|
||||
@@ -190,7 +189,7 @@ index 4f8130dfd0..0000000000
|
||||
- end
|
||||
-end
|
||||
diff --git a/src/invidious/routes/account.cr b/src/invidious/routes/account.cr
|
||||
index 9d930841aa..5b55738e5f 100644
|
||||
index 9d930841a..5b55738e5 100644
|
||||
--- a/src/invidious/routes/account.cr
|
||||
+++ b/src/invidious/routes/account.cr
|
||||
@@ -123,10 +123,8 @@ module Invidious::Routes::Account
|
||||
@@ -205,7 +204,7 @@ index 9d930841aa..5b55738e5f 100644
|
||||
env.request.cookies.each do |cookie|
|
||||
cookie.expires = Time.utc(1990, 1, 1)
|
||||
diff --git a/src/invidious/routes/login.cr b/src/invidious/routes/login.cr
|
||||
index d0f7ac229d..add9f75d3a 100644
|
||||
index d0f7ac229..add9f75d3 100644
|
||||
--- a/src/invidious/routes/login.cr
|
||||
+++ b/src/invidious/routes/login.cr
|
||||
@@ -160,9 +160,6 @@ module Invidious::Routes::Login
|
||||
@@ -218,21 +217,8 @@ index d0f7ac229d..add9f75d3a 100644
|
||||
env.response.cookies["SID"] = Invidious::User::Cookies.sid(CONFIG.domain, sid)
|
||||
|
||||
if env.request.cookies["PREFS"]?
|
||||
diff --git a/src/invidious/routes/search.cr b/src/invidious/routes/search.cr
|
||||
index 6c3088deeb..c6bd3c4bb8 100644
|
||||
--- a/src/invidious/routes/search.cr
|
||||
+++ b/src/invidious/routes/search.cr
|
||||
@@ -51,6 +51,8 @@ module Invidious::Routes::Search
|
||||
else
|
||||
user = env.get? "user"
|
||||
|
||||
+ user = user ? user.as(User) : nil
|
||||
+
|
||||
begin
|
||||
videos = query.process
|
||||
rescue ex : ChannelSearchException
|
||||
diff --git a/src/invidious/search/processors.cr b/src/invidious/search/processors.cr
|
||||
index 25edb93622..10b81c59e0 100644
|
||||
index 25edb9362..10b81c59e 100644
|
||||
--- a/src/invidious/search/processors.cr
|
||||
+++ b/src/invidious/search/processors.cr
|
||||
@@ -37,18 +37,18 @@ module Invidious::Search
|
||||
@@ -264,7 +250,7 @@ index 25edb93622..10b81c59e0 100644
|
||||
)
|
||||
end
|
||||
diff --git a/src/invidious/users.cr b/src/invidious/users.cr
|
||||
index 65566d2074..0b2d1ef5fa 100644
|
||||
index 65566d207..0b2d1ef5f 100644
|
||||
--- a/src/invidious/users.cr
|
||||
+++ b/src/invidious/users.cr
|
||||
@@ -27,7 +27,6 @@ def get_subscription_feed(user, max_results = 40, page = 1)
|
||||
@@ -331,5 +317,3 @@ index 65566d2074..0b2d1ef5fa 100644
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user