]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tools/peertube-import-videos.ts
Fix user subscription follows count
[github/Chocobozzz/PeerTube.git] / server / tools / peertube-import-videos.ts
index 52aae3d2c372cd51783376ec3dd0d0ea82bde4af..758b561e1b959c4b3745fae55026c971fde5b942 100644 (file)
@@ -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<any>((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)