Browse Source
Fix switch invidious instance btn on videos
pull/1940/head
syeopite
5 years ago
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82
2 changed files with
2 additions and
2 deletions
-
src/invidious/helpers/utils.cr
-
src/invidious/views/components/item.ecr
|
|
@ -435,7 +435,7 @@ def fetch_random_instance |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
if !broken_health_monitoring |
|
|
if !broken_health_monitoring |
|
|
health = data[1]["monitor"].as_h["dailyRatios"][0].as_h["ratio"] |
|
|
|
|
|
|
|
|
health = data[1]["monitor"].as_h["dailyRatios"][0].as_h["ratio"] |
|
|
filtered_instance_list << data[0].as_s if health.to_s.to_f > 90 |
|
|
filtered_instance_list << data[0].as_s if health.to_s.to_f > 90 |
|
|
else |
|
|
else |
|
|
# We can't check the health if the monitoring is broken. Thus we'll just add it to the list |
|
|
# We can't check the health if the monitoring is broken. Thus we'll just add it to the list |
|
|
|
|
|
@ -148,7 +148,7 @@ |
|
|
<a title="<%=translate(locale, "Audio mode")%>" href="/watch?v=<%= item.id %>&listen=1"> |
|
|
<a title="<%=translate(locale, "Audio mode")%>" href="/watch?v=<%= item.id %>&listen=1"> |
|
|
<i class="icon ion-md-headset"></i> |
|
|
<i class="icon ion-md-headset"></i> |
|
|
</a> |
|
|
</a> |
|
|
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="/redirect?referer=<%= env.get?("current_page") %>"> |
|
|
|
|
|
|
|
|
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="/redirect?referer=<%=HTML.escape("watch?v=#{item.id}")%>"> |
|
|
<i class="icon ion-md-jet"></i> |
|
|
<i class="icon ion-md-jet"></i> |
|
|
</a> |
|
|
</a> |
|
|
</div> |
|
|
</div> |
|
|
|