feat: add option to force proxying of videos
All checks were successful
Invidious CI / build (push) Successful in 5m20s
All checks were successful
Invidious CI / build (push) Successful in 5m20s
This commit is contained in:
parent
7aba1f7ba3
commit
7c9f79e1f1
3 changed files with 9 additions and 2 deletions
|
@ -239,6 +239,8 @@ class Config
|
||||||
|
|
||||||
property check_backends_interval : Int32 = 30
|
property check_backends_interval : Int32 = 30
|
||||||
|
|
||||||
|
property force_local : Bool = true
|
||||||
|
|
||||||
{% if flag?(:linux) %}
|
{% if flag?(:linux) %}
|
||||||
property reload_config_automatically : Bool = true
|
property reload_config_automatically : Bool = true
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
|
@ -109,7 +109,9 @@ def process_video_params(query, preferences)
|
||||||
quality = "high"
|
quality = "high"
|
||||||
end
|
end
|
||||||
|
|
||||||
if CONFIG.disabled?("local") && local
|
if CONFIG.force_local
|
||||||
|
local = true
|
||||||
|
elsif CONFIG.disabled?("local") && local
|
||||||
local = false
|
local = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,10 @@
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<label for="local"><%= translate(locale, "preferences_local_label") %></label>
|
<label for="local"><%= translate(locale, "preferences_local_label") %></label>
|
||||||
<input name="local" id="local" type="checkbox" <% if preferences.local && !CONFIG.disabled?("local") %>checked<% end %> <% if CONFIG.disabled?("local") %>disabled<% end %>>
|
<input name="local" id="local" type="checkbox" <% if CONFIG.force_local %>disabled="" <% end %><% if preferences.local && !CONFIG.disabled?("local") %>checked<% end %> <% if CONFIG.disabled?("local") %>disabled<% end %>>
|
||||||
|
<% if CONFIG.force_local %>
|
||||||
|
<label for="local">(All videos are proxied by default)</label>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
|
|
Loading…
Add table
Reference in a new issue