aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/youtube-dl.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-08 15:16:01 +0200
committerChocobozzz <me@florianbigard.com>2021-04-08 15:16:01 +0200
commitdc48fdbe68e9dd3a3a6028181e61d8595d98e654 (patch)
treeb641873412bfb4ff2a754a27762cd533c735e7d8 /server/helpers/youtube-dl.ts
parent27ec473f5306621643fcb169be7cfe6b15136265 (diff)
parentb9244002fcc48dda7f3a588980d910a40429238f (diff)
downloadPeerTube-dc48fdbe68e9dd3a3a6028181e61d8595d98e654.tar.gz
PeerTube-dc48fdbe68e9dd3a3a6028181e61d8595d98e654.tar.zst
PeerTube-dc48fdbe68e9dd3a3a6028181e61d8595d98e654.zip
Merge branch 'release/3.1.0' into develop
Diffstat (limited to 'server/helpers/youtube-dl.ts')
-rw-r--r--server/helpers/youtube-dl.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts
index 9d2e54fb5..fac3da6ba 100644
--- a/server/helpers/youtube-dl.ts
+++ b/server/helpers/youtube-dl.ts
@@ -76,7 +76,7 @@ function getYoutubeDLSubs (url: string, opts?: object): Promise<YoutubeDLSubs> {
76 logger.debug('Get subtitles from youtube dl.', { url, files }) 76 logger.debug('Get subtitles from youtube dl.', { url, files })
77 77
78 const subtitles = files.reduce((acc, filename) => { 78 const subtitles = files.reduce((acc, filename) => {
79 const matched = filename.match(/\.([a-z]{2})\.(vtt|ttml)/i) 79 const matched = filename.match(/\.([a-z]{2})(-[a-z]+)?\.(vtt|ttml)/i)
80 if (!matched || !matched[1]) return acc 80 if (!matched || !matched[1]) return acc
81 81
82 return [ 82 return [