import { createWriteStream, ensureDir, remove } from 'fs-extra'
import { CONFIG } from '../initializers/config'
import { dirname, join } from 'path'
+import * as createTorrent from 'create-torrent'
+import { promisify2 } from './core-utils'
async function downloadWebTorrentVideo (target: { magnetUri: string, torrentName?: string }, timeout: number) {
const id = target.magnetUri || target.torrentName
})
}
+const createTorrentPromise = promisify2<string, any, any>(createTorrent)
+
// ---------------------------------------------------------------------------
export {
+ createTorrentPromise,
downloadWebTorrentVideo
}