summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2022-02-22 19:44:41 +0100
committerGitHub <noreply@github.com>2022-02-22 19:44:41 +0100
commitb58b0440d6bd314f1e9831f7c3924d8f6ea75b10 (patch)
tree16f69b9293bbd4180c33646eed6cedb5933a8c43 /src
parent505a81d087274218a8762c7726f10d89ef4556a4 (diff)
downloadinvidious-b58b0440d6bd314f1e9831f7c3924d8f6ea75b10.tar.gz
invidious-b58b0440d6bd314f1e9831f7c3924d8f6ea75b10.tar.bz2
invidious-b58b0440d6bd314f1e9831f7c3924d8f6ea75b10.zip
Fix captions regex
Diffstat (limited to 'src')
-rw-r--r--src/invidious/routes/api/v1/videos.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/routes/api/v1/videos.cr b/src/invidious/routes/api/v1/videos.cr
index 2b23d2ad..2a4911db 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"]?