mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Minor fixes
This commit is contained in:
parent
7828cd9767
commit
3a95d21808
2 changed files with 4 additions and 4 deletions
|
@ -223,7 +223,7 @@ def rank_videos(db, n)
|
|||
end
|
||||
|
||||
def make_client(url, context)
|
||||
client = HTTP::Client.new(URL, CONTEXT)
|
||||
client = HTTP::Client.new(url, context)
|
||||
client.read_timeout = 10.seconds
|
||||
client.connect_timeout = 10.seconds
|
||||
return client
|
||||
|
|
|
@ -81,7 +81,7 @@ threads.times do
|
|||
id = ids[0]
|
||||
video = get_video(id, client, PG_DB)
|
||||
rescue ex
|
||||
io << id << " : " << ex << "\n"
|
||||
io << id << " : " << ex.message << "\n"
|
||||
pool << make_client(URL, CONTEXT)
|
||||
next
|
||||
ensure
|
||||
|
@ -157,11 +157,10 @@ get "/watch" do |env|
|
|||
next
|
||||
end
|
||||
|
||||
listen = false
|
||||
if env.params.query["listen"]? && env.params.query["listen"] == "true"
|
||||
listen = true
|
||||
env.params.query.delete_all("listen")
|
||||
else
|
||||
listen = false
|
||||
end
|
||||
|
||||
client = get_client(pool)
|
||||
|
@ -233,6 +232,7 @@ get "/search" do |env|
|
|||
env.redirect "/"
|
||||
next
|
||||
end
|
||||
|
||||
page = env.params.query["page"]? && env.params.query["page"].to_i? ? env.params.query["page"].to_i : 1
|
||||
|
||||
client = get_client(pool)
|
||||
|
|
Loading…
Reference in a new issue