diff --git a/src/invidious/config.cr b/src/invidious/config.cr index 4c0b2686..f112084e 100644 --- a/src/invidious/config.cr +++ b/src/invidious/config.cr @@ -171,6 +171,9 @@ class Config # List of names of the backends property backends : Array(String) = [] of String + # Character used to separate the backend number from the description/note + # of the backend + property backends_delimiter : String = "|" property external_videoplayback_proxy : String? diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index bd6fa83d..2767be7f 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -1,6 +1,7 @@ <% locale = env.get("preferences").as(Preferences).locale dark_mode = env.get("preferences").as(Preferences).dark_mode + current_backend = env.request.cookies["SERVER_ID"]?.try &.value %> @@ -104,13 +105,26 @@ - <% if CONFIG.backends %> + <% if !CONFIG.backends.empty? %>