From 197e4d6f6641c168008e07672af60492e17c9e5c Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 22 May 2025 00:39:20 -0400 Subject: [PATCH] feat: config option to change the backend prefix --- src/invidious/config.cr | 2 ++ src/invidious/views/template.ecr | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/invidious/config.cr b/src/invidious/config.cr index f30dc813..97debaf4 100644 --- a/src/invidious/config.cr +++ b/src/invidious/config.cr @@ -243,6 +243,8 @@ class Config property disable_video_downloads : Bool = false + property backend_name_prefix : String = "Backend" + {% if flag?(:linux) %} property reload_config_automatically : Bool = true {% end %} diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 0fc8454b..e4c81238 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -121,7 +121,7 @@ <% host_backend = env.request.headers["Host"].sub(/([^.]+)(\d+)/, "\\1#{index+1}") %> <% is_current_backend_host = host_backend == env.request.headers["Host"] %> display: inline-block;"> - Backend<%= HTML.escape((index + 1).to_s) %> <%= HTML.escape(companion.note) %> + <%= HTML.escape(CONFIG.backend_name_prefix + (index + 1).to_s) %> <%= HTML.escape(companion.note) %> <% CONFIG.invidious_companion.each_with_index do | companion, index | %> display: inline-block;"> - Backend<%= HTML.escape((index + 1).to_s) %> <%= HTML.escape(companion.note) %> + <%= HTML.escape(CONFIG.backend_name_prefix + (index + 1).to_s) %> <%= HTML.escape(companion.note) %>