]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/youtube-dl.ts
Fix video update
[github/Chocobozzz/PeerTube.git] / server / helpers / youtube-dl.ts
index 9d2e54fb53dd22a8379b9518c6b45d4a0cef9082..fac3da6ba404c7e5d3268d15523239e97492e643 100644 (file)
@@ -76,7 +76,7 @@ function getYoutubeDLSubs (url: string, opts?: object): Promise<YoutubeDLSubs> {
           logger.debug('Get subtitles from youtube dl.', { url, files })
 
           const subtitles = files.reduce((acc, filename) => {
-            const matched = filename.match(/\.([a-z]{2})\.(vtt|ttml)/i)
+            const matched = filename.match(/\.([a-z]{2})(-[a-z]+)?\.(vtt|ttml)/i)
             if (!matched || !matched[1]) return acc
 
             return [