From 6c38f40d966eb25e53ac38174153cb1fef0475f5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Aug 2022 14:58:27 +0200 Subject: Prevent weird error on sync failure --- server/helpers/youtube-dl/youtube-dl-wrapper.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/helpers/youtube-dl') diff --git a/server/helpers/youtube-dl/youtube-dl-wrapper.ts b/server/helpers/youtube-dl/youtube-dl-wrapper.ts index 3264cc9ff..2c3ba2feb 100644 --- a/server/helpers/youtube-dl/youtube-dl-wrapper.ts +++ b/server/helpers/youtube-dl/youtube-dl-wrapper.ts @@ -59,6 +59,8 @@ class YoutubeDLWrapper { processOptions }) + if (!Array.isArray(list)) throw new Error(`YoutubeDL could not get list info from ${this.url}`) + return list.map(info => { const infoBuilder = new YoutubeDLInfoBuilder(info) -- cgit v1.2.3