|
|
|
@ -425,8 +425,11 @@ module YoutubeAPI
|
|
|
|
|
)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Decompress the body ourselves, given that auto-decompress is
|
|
|
|
|
# broken in the Crystal stdlib.
|
|
|
|
|
if {{ !flag?(:disable_quic) }} && CONFIG.use_quic
|
|
|
|
|
body = response.body
|
|
|
|
|
else
|
|
|
|
|
# Decompress the body ourselves, when using HTTP::Client given that
|
|
|
|
|
# auto-decompress is broken in the Crystal stdlib.
|
|
|
|
|
# Read more:
|
|
|
|
|
# - https://github.com/iv-org/invidious/issues/2612
|
|
|
|
|
# - https://github.com/crystal-lang/crystal/issues/11354
|
|
|
|
@ -439,6 +442,7 @@ module YoutubeAPI
|
|
|
|
|
else
|
|
|
|
|
body = response.body
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Convert result to Hash
|
|
|
|
|
initial_data = JSON.parse(body).as_h
|
|
|
|
|