mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-28 08:27:25 +00:00
parent
52bc9aa328
commit
06e1a508e8
@ -12,7 +12,7 @@ module Invidious::Routes::Images
|
|||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GGPHT_POOL.client &.get(url) do |resp|
|
GGPHT_POOL.client &.get(url, headers) do |resp|
|
||||||
return self.proxy_image(env, resp)
|
return self.proxy_image(env, resp)
|
||||||
end
|
end
|
||||||
rescue ex
|
rescue ex
|
||||||
@ -42,7 +42,7 @@ module Invidious::Routes::Images
|
|||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
get_ytimg_pool(authority).client &.get(url) do |resp|
|
get_ytimg_pool(authority).client &.get(url, headers) do |resp|
|
||||||
return self.proxy_image(env, resp)
|
return self.proxy_image(env, resp)
|
||||||
end
|
end
|
||||||
rescue ex
|
rescue ex
|
||||||
@ -64,7 +64,7 @@ module Invidious::Routes::Images
|
|||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
get_ytimg_pool("i9").client &.get(url) do |resp|
|
get_ytimg_pool("i9").client &.get(url, headers) do |resp|
|
||||||
return self.proxy_image(env, resp)
|
return self.proxy_image(env, resp)
|
||||||
end
|
end
|
||||||
rescue ex
|
rescue ex
|
||||||
@ -110,7 +110,7 @@ module Invidious::Routes::Images
|
|||||||
if name == "maxres.jpg"
|
if name == "maxres.jpg"
|
||||||
build_thumbnails(id).each do |thumb|
|
build_thumbnails(id).each do |thumb|
|
||||||
thumbnail_resource_path = "/vi/#{id}/#{thumb[:url]}.jpg"
|
thumbnail_resource_path = "/vi/#{id}/#{thumb[:url]}.jpg"
|
||||||
if get_ytimg_pool("i9").client &.head(thumbnail_resource_path).status_code == 200
|
if get_ytimg_pool("i9").client &.head(thumbnail_resource_path, headers).status_code == 200
|
||||||
name = thumb[:url] + ".jpg"
|
name = thumb[:url] + ".jpg"
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@ -126,7 +126,7 @@ module Invidious::Routes::Images
|
|||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
get_ytimg_pool("i").client &.get(url) do |resp|
|
get_ytimg_pool("i").client &.get(url, headers) do |resp|
|
||||||
return self.proxy_image(env, resp)
|
return self.proxy_image(env, resp)
|
||||||
end
|
end
|
||||||
rescue ex
|
rescue ex
|
||||||
|
Loading…
Reference in New Issue
Block a user