Use HTTP pools for image requests to YouTube

This commit is contained in:
syeopite committed 2024-08-24 19:45:52 -07:00
1 parent c5fdd9ea65
commit 480e073fa9
3 files changed
+28 -7

No files matched your search

+8
View File
@@ -92,6 +92,14 @@ SOFTWARE = {
YT_POOL = YoutubeConnectionPool.new(YT_URL, capacity: CONFIG.pool_size)
# Image request pool
GGPHT_POOL = YoutubeConnectionPool.new(URI.parse("https://yt3.ggpht.com"), capacity: CONFIG.pool_size)
# Mapping of subdomain => YoutubeConnectionPool
# This is needed as we may need to access arbitrary subdomains of ytimg
YTIMG_POOLS = {} of String => YoutubeConnectionPool
# CLI
Kemal.config.extra_options do |parser|
parser.banner = "Usage: invidious [arguments]"