mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-13 16:18:29 +00:00
Fix lint
This commit is contained in:
parent
8cad76b2cf
commit
ba77812a85
@ -101,8 +101,8 @@ class Config
|
|||||||
property host_binding : String = "0.0.0.0" # Host to bind (overrided by command line argument)
|
property host_binding : String = "0.0.0.0" # Host to bind (overrided by command line argument)
|
||||||
property pool_size : Int32 = 100 # Pool size for HTTP requests to youtube.com and ytimg.com (each domain has a separate pool of `pool_size`)
|
property pool_size : Int32 = 100 # Pool size for HTTP requests to youtube.com and ytimg.com (each domain has a separate pool of `pool_size`)
|
||||||
property use_quic : Bool = true # Use quic transport for youtube api
|
property use_quic : Bool = true # Use quic transport for youtube api
|
||||||
property quic_proxy_address : String = "0.0.0.0" # Address for the QUIC proxy
|
property quic_proxy_address : String = "0.0.0.0" # Address for the QUIC proxy
|
||||||
property quic_proxy_port : Int32 = 7192 # Port for the Quic Proxy
|
property quic_proxy_port : Int32 = 7192 # Port for the Quic Proxy
|
||||||
|
|
||||||
@[YAML::Field(converter: Preferences::StringToCookies)]
|
@[YAML::Field(converter: Preferences::StringToCookies)]
|
||||||
property cookies : HTTP::Cookies = HTTP::Cookies.new # Saved cookies in "name1=value1; name2=value2..." format
|
property cookies : HTTP::Cookies = HTTP::Cookies.new # Saved cookies in "name1=value1; name2=value2..." format
|
||||||
|
@ -72,14 +72,13 @@ class QuicProxyWrapper
|
|||||||
|
|
||||||
@yt_headers = header_retreival.headers
|
@yt_headers = header_retreival.headers
|
||||||
# Scans through yt_headers and makes sure that all values are strings.
|
# Scans through yt_headers and makes sure that all values are strings.
|
||||||
@yt_headers.each do |k,v|
|
@yt_headers.each do |k, v|
|
||||||
if v.is_a? Array
|
if v.is_a? Array
|
||||||
@yt_headers[k] = v[0]
|
@yt_headers[k] = v[0]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def family=(value)
|
def family=(value)
|
||||||
@conn.family = value
|
@conn.family = value
|
||||||
end
|
end
|
||||||
@ -155,7 +154,7 @@ class QuicProxyWrapper
|
|||||||
headers = convert_headers(headers)
|
headers = convert_headers(headers)
|
||||||
headers.merge!(@yt_headers)
|
headers.merge!(@yt_headers)
|
||||||
data = {"method" => "POST", "url" => "#{YT_URL.to_s}#{url}",
|
data = {"method" => "POST", "url" => "#{YT_URL.to_s}#{url}",
|
||||||
"headers"=>headers.to_h, "data" => form}.to_json
|
"headers" => headers.to_h, "data" => form}.to_json
|
||||||
|
|
||||||
return @conn.post("/", body: data)
|
return @conn.post("/", body: data)
|
||||||
end
|
end
|
||||||
@ -175,15 +174,15 @@ end
|
|||||||
|
|
||||||
# We're just using this to retreive the headers from add_yt_headers
|
# We're just using this to retreive the headers from add_yt_headers
|
||||||
class HackyHeaderRetrevialClass
|
class HackyHeaderRetrevialClass
|
||||||
def initialize()
|
def initialize
|
||||||
@headers_dict = {} of String => String
|
@headers_dict = {} of String => String
|
||||||
end
|
end
|
||||||
|
|
||||||
def headers()
|
def headers
|
||||||
return @headers_dict
|
return @headers_dict
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource()
|
def resource
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user