X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftools%2Fpeertube-import-videos.ts;h=758b561e1b959c4b3745fae55026c971fde5b942;hb=e1a570abff3ebf375433e58e7362d56bd32d4cd8;hp=caf1facc7c4a7f3a46f55751fdb5c57b94bf4fe8;hpb=89d241a79c262b9775c233b73cff080043ebb5e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index caf1facc7..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' @@ -20,7 +19,9 @@ import { getLogger, getServerCredentials } from './cli' -import { ServerInfo } from '@shared/extra-utils' +import { PeerTubeServer } from '@shared/extra-utils' + +import prompt = require('prompt') const processOptions = { maxBuffer: Infinity @@ -270,7 +271,7 @@ async function uploadVideoOnPeerTube (parameters: { /* ---------------------------------------------------------- */ -async function getCategory (server: ServerInfo, categories: string[]) { +async function getCategory (server: PeerTubeServer, categories: string[]) { if (!categories) return undefined const categoryString = categories[0] @@ -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)