Fix captions regex

This commit is contained in:
Samantaz Fox 2022-02-22 19:44:41 +01:00 committed by GitHub
parent 505a81d087
commit b58b0440d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,7 @@ module Invidious::Routes::API::V1::Videos
# #
# See: https://github.com/iv-org/invidious/issues/2391 # See: https://github.com/iv-org/invidious/issues/2391
webvtt = YT_POOL.client &.get("#{url}&format=vtt").body webvtt = YT_POOL.client &.get("#{url}&format=vtt").body
.gsub(/([0-9:.]+ --> [0-9:.]+).+/, "\\1") .gsub(/([0-9:.]{12} --> [0-9:.]{12}).+/, "\\1")
end end
if title = env.params.query["title"]? if title = env.params.query["title"]?