From c7763eddd14ee6a4a448d5187f46f79b22047d20 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Jun 2020 09:35:18 +0200 Subject: [PATCH] Fix getSubs import --- server/helpers/youtube-dl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts index f0944b94f..2014aab0a 100644 --- a/server/helpers/youtube-dl.ts +++ b/server/helpers/youtube-dl.ts @@ -61,6 +61,7 @@ function getYoutubeDLSubs (url: string, opts?: object): Promise { .then(youtubeDL => { youtubeDL.getSubs(url, options, (err, files) => { if (err) return rej(err) + if (!files) return [] logger.debug('Get subtitles from youtube dl.', { url, files }) -- 2.25.1