X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube-import-videos.ts;h=758b561e1b959c4b3745fae55026c971fde5b942;hb=e1a570abff3ebf375433e58e7362d56bd32d4cd8;hp=52aae3d2c372cd51783376ec3dd0d0ea82bde4af;hpb=9e8789497377cac5554a622da605f5b89587aa9c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index 52aae3d2c..758b561e1 100644 --- a/server/tools/peertube-import-videos.ts +++ b/server/tools/peertube-import-videos.ts @@ -6,7 +6,6 @@ import { accessSync, constants } from 'fs' import { remove } from 'fs-extra' import { truncate } from 'lodash' import { join } from 'path' -import * as prompt from 'prompt' import { promisify } from 'util' import { YoutubeDL } from '@server/helpers/youtube-dl' import { sha256 } from '../helpers/core-utils' @@ -22,6 +21,8 @@ import { } from './cli' import { PeerTubeServer } from '@shared/extra-utils' +import prompt = require('prompt') + const processOptions = { maxBuffer: Infinity } @@ -407,7 +408,7 @@ function getYoutubeDLInfo (youtubeDL: any, url: string, args: string[]) { return new Promise((res, rej) => { const options = [ '-j', '--flat-playlist', '--playlist-reverse', ...args ] - youtubeDL.getInfo(url, options, processOptions, async (err, info) => { + youtubeDL.getInfo(url, options, processOptions, (err, info) => { if (err) return rej(err) return res(info)