mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-20 11:48:31 -06:00
Fix subtitles import
This commit is contained in:
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
Block a user