aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-08 14:29:03 +0200
committerChocobozzz <me@florianbigard.com>2021-04-08 14:29:03 +0200
commit4c7449d2add412e2cef4d55b357d58abaa0ae83b (patch)
tree51752a29073495945ae600b1d282cb5ffe64952b /server/helpers
parentf6160062f8841c6957a643429fb6926a06e508ee (diff)
downloadPeerTube-4c7449d2add412e2cef4d55b357d58abaa0ae83b.tar.gz
PeerTube-4c7449d2add412e2cef4d55b357d58abaa0ae83b.tar.zst
PeerTube-4c7449d2add412e2cef4d55b357d58abaa0ae83b.zip
Fix subtitles import
Diffstat (limited to 'server/helpers')
-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 8537a5772..5b46f704a 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 [