pull/5154/head
epicsam123 2025-01-24 21:54:10 -05:00 zatwierdzone przez GitHub
rodzic 6816ded0fa
commit afb0aad7d3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -46,13 +46,13 @@ module Invidious::Routes::Misc
if instance_list.empty?
instance_url = redirect_url
else
# Sample returns an array
# Instances are packaged as {region, domain} in the instance list
# Filter out the current instance
other_available_instances = instance_list.reject! { |region, domain| domain == CONFIG.domain }
# If there are any other instances, select a random one
if other_available_instances.any?
# Sample returns an array
# Instances are packaged as {region, domain} in the instance list
instance_url = other_available_instances.sample(1)[0][1]
else
# If the current instance is the only one, use the redirect URL as fallback