External Proxies: Use list of external videoplayback proxies

This commit is contained in:
Fijxu
2024-10-11 13:50:42 -03:00
parent b551fcf96a
commit e78f7e5430
5 changed files with 34 additions and 17 deletions

View File

@@ -383,3 +383,17 @@ def parse_link_endpoint(endpoint : JSON::Any, text : String, video_id : String)
end
return text
end
# Generates a list of external videoplayback proxies for
# CSP
def gen_videoplayback_proxy_list
if !CONFIG.external_videoplayback_proxy.empty?
external_videoplayback_proxy = ""
CONFIG.external_videoplayback_proxy.each do |proxy|
external_videoplayback_proxy += " #{proxy}"
end
else
external_videoplayback_proxy = ""
end
return external_videoplayback_proxy
end