Search API: Fix named arg syntax to make_client

This commit is contained in:
syeopite
2024-06-16 14:15:05 -07:00
parent ee89db49ba
commit bd48af825c
2 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ struct YoutubeConnectionPool
end
end
def make_client(url : URI, region = nil, force_resolve : Bool = false, force_youtube_header : Bool = false)
def make_client(url : URI, region = nil, force_resolve : Bool = false, force_youtube_headers : Bool = false)
client = HTTP::Client.new(url)
# Force the usage of a specific configured IP Family
@@ -57,7 +57,7 @@ def make_client(url : URI, region = nil, force_resolve : Bool = false, force_you
client.family = CONFIG.force_resolve
end
client.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com" || force_youtube_header
client.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com" || force_youtube_headers
client.read_timeout = 10.seconds
client.connect_timeout = 10.seconds