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
@ -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