1
0
Fork 0

Fix youtube video import

This commit is contained in:
Chocobozzz 2018-11-21 16:29:09 +01:00
parent fef13f1480
commit 9fa0ea41aa
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 2 deletions

View File

@ -24,10 +24,10 @@ const processOptions = {
function getYoutubeDLInfo (url: string, opts?: string[]): Promise<YoutubeDLInfo> {
return new Promise<YoutubeDLInfo>(async (res, rej) => {
const options = opts || [ '-j', '--flat-playlist' ]
const args = opts || [ '-j', '--flat-playlist' ]
const youtubeDL = await safeGetYoutubeDL()
youtubeDL.getInfo(url, options, (err, info) => {
youtubeDL.getInfo(url, args, processOptions, (err, info) => {
if (err) return rej(err)
if (info.is_live === true) return rej(new Error('Cannot download a live streaming.'))