pull/4221/merge
karelrooted 2024-04-27 00:52:39 +02:00 zatwierdzone przez GitHub
commit a021d7afb4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -136,7 +136,11 @@ module Invidious::Routes::API::V1::Videos
end
end
else
webvtt = YT_POOL.client &.get("#{url}&fmt=vtt").body
uri = URI.parse(url)
query_params = uri.query_params
query_params["fmt"] = "vtt"
uri.query_params = query_params
webvtt = YT_POOL.client &.get(uri.request_target).body
if webvtt.starts_with?("<?xml")
webvtt = caption.timedtext_to_vtt(webvtt)