From b58b0440d6bd314f1e9831f7c3924d8f6ea75b10 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Tue, 22 Feb 2022 19:44:41 +0100 Subject: [PATCH] Fix captions regex --- src/invidious/routes/api/v1/videos.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/routes/api/v1/videos.cr b/src/invidious/routes/api/v1/videos.cr index 2b23d2ad6..2a4911dbf 100644 --- a/src/invidious/routes/api/v1/videos.cr +++ b/src/invidious/routes/api/v1/videos.cr @@ -136,7 +136,7 @@ module Invidious::Routes::API::V1::Videos # # See: https://github.com/iv-org/invidious/issues/2391 webvtt = YT_POOL.client &.get("#{url}&format=vtt").body - .gsub(/([0-9:.]+ --> [0-9:.]+).+/, "\\1") + .gsub(/([0-9:.]{12} --> [0-9:.]{12}).+/, "\\1") end if title = env.params.query["title"]?