Skip to content

Commit

Permalink
moved comments
Browse files Browse the repository at this point in the history
  • Loading branch information
epicsam123 authored Jan 25, 2025
1 parent 6816ded commit afb0aad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/invidious/routes/misc.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit afb0aad

Please sign in to comment.