mirror of https://github.com/Chocobozzz/PeerTube
Fix subtitles import
parent
f6160062f8
commit
4c7449d2ad
|
@ -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 [
|
||||
|
|
Loading…
Reference in New Issue