aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/schedulers/youtube-dl-update-scheduler.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
commit62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch)
treec45c35d35d7a3e32621fba06edc63646930c8efd /server/lib/schedulers/youtube-dl-update-scheduler.ts
parent84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff)
downloadPeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.gz
PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.zst
PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.zip
Correctly migrate to fs-extra
Diffstat (limited to 'server/lib/schedulers/youtube-dl-update-scheduler.ts')
-rw-r--r--server/lib/schedulers/youtube-dl-update-scheduler.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/schedulers/youtube-dl-update-scheduler.ts b/server/lib/schedulers/youtube-dl-update-scheduler.ts
index da47378e8..faadb4334 100644
--- a/server/lib/schedulers/youtube-dl-update-scheduler.ts
+++ b/server/lib/schedulers/youtube-dl-update-scheduler.ts
@@ -5,9 +5,9 @@ import { AbstractScheduler } from './abstract-scheduler'
5import { SCHEDULER_INTERVALS_MS } from '../../initializers' 5import { SCHEDULER_INTERVALS_MS } from '../../initializers'
6import { logger } from '../../helpers/logger' 6import { logger } from '../../helpers/logger'
7import * as request from 'request' 7import * as request from 'request'
8import { createWriteStream, writeFile } from 'fs-extra' 8import { createWriteStream, ensureDir, writeFile } from 'fs-extra'
9import { join } from 'path' 9import { join } from 'path'
10import { mkdirpPromise, root } from '../../helpers/core-utils' 10import { root } from '../../helpers/core-utils'
11 11
12export class YoutubeDlUpdateScheduler extends AbstractScheduler { 12export class YoutubeDlUpdateScheduler extends AbstractScheduler {
13 13
@@ -27,7 +27,7 @@ export class YoutubeDlUpdateScheduler extends AbstractScheduler {
27 const detailsPath = join(binDirectory, 'details') 27 const detailsPath = join(binDirectory, 'details')
28 const url = 'https://yt-dl.org/downloads/latest/youtube-dl' 28 const url = 'https://yt-dl.org/downloads/latest/youtube-dl'
29 29
30 await mkdirpPromise(binDirectory) 30 await ensureDir(binDirectory)
31 31
32 return new Promise(res => { 32 return new Promise(res => {
33 request.get(url, { followRedirect: false }, (err, result) => { 33 request.get(url, { followRedirect: false }, (err, result) => {