Use config.domain in place of hardcoded value

This commit is contained in:
Omar Roth 2019-01-19 09:10:52 -06:00
parent 9580a21786
commit 20c4d213d9
4 changed files with 20 additions and 15 deletions

View file

@ -15,7 +15,10 @@ class Config
https_only: Bool?,
hmac_key: String?,
full_refresh: Bool,
domain: String?,
domain: {
type: String?,
default: "invidio.us",
},
})
end

View file

@ -205,8 +205,6 @@ def make_host_url(ssl, host)
scheme = "http://"
end
host ||= "invidio.us"
return "#{scheme}#{host}"
end

View file

@ -137,7 +137,7 @@ BYPASS_REGIONS = {
}
VIDEO_THUMBNAILS = {
{name: "maxres", host: "invidio.us", url: "maxres", height: 720, width: 1280},
{name: "maxres", host: "#{CONFIG.domain}", url: "maxres", height: 720, width: 1280},
{name: "maxresdefault", host: "i.ytimg.com", url: "maxresdefault", height: 720, width: 1280},
{name: "sddefault", host: "i.ytimg.com", url: "sddefault", height: 480, width: 640},
{name: "high", host: "i.ytimg.com", url: "hqdefault", height: 360, width: 480},