diff --git a/patches/020-disable-switching-to-unhelathy-backends.patch b/patches/020-disable-switching-to-unhelathy-backends.patch new file mode 100644 index 0000000..58146f9 --- /dev/null +++ b/patches/020-disable-switching-to-unhelathy-backends.patch @@ -0,0 +1,30 @@ +diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr +index 413cfc22..347ca227 100644 +--- a/src/invidious/views/template.ecr ++++ b/src/invidious/views/template.ecr +@@ -120,13 +120,18 @@ + <% end %> + <% current_page = env.get("current_page") %> + <% CONFIG.invidious_companion.each_with_index do | companion, index | %> +- display: inline-block;"> +- <%= HTML.escape(CONFIG.backend_name_prefix + (index + 1).to_s) %> <%= HTML.escape(companion.note) %> +- +- ++ <% if status[index] == BackendInfo::Status::Working.to_i %> ++ display: inline-block;"> ++ <%= HTML.escape(CONFIG.backend_name_prefix + (index + 1).to_s) %> <%= HTML.escape(companion.note) %> ++ ++ ++ <% end %> ++ <% if status[index] == BackendInfo::Status::Dead.to_i %> ++ display: inline-block;"> ++ <%= HTML.escape(CONFIG.backend_name_prefix + (index + 1).to_s) %> <%= HTML.escape(companion.note) %> ++ ++ ++ <% end %> + <% if !(index == CONFIG.invidious_companion.size-1) %> + | + <% end %>