diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
commit | 62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch) | |
tree | c45c35d35d7a3e32621fba06edc63646930c8efd /server/lib/schedulers/youtube-dl-update-scheduler.ts | |
parent | 84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff) | |
download | PeerTube-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.ts | 6 |
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' | |||
5 | import { SCHEDULER_INTERVALS_MS } from '../../initializers' | 5 | import { SCHEDULER_INTERVALS_MS } from '../../initializers' |
6 | import { logger } from '../../helpers/logger' | 6 | import { logger } from '../../helpers/logger' |
7 | import * as request from 'request' | 7 | import * as request from 'request' |
8 | import { createWriteStream, writeFile } from 'fs-extra' | 8 | import { createWriteStream, ensureDir, writeFile } from 'fs-extra' |
9 | import { join } from 'path' | 9 | import { join } from 'path' |
10 | import { mkdirpPromise, root } from '../../helpers/core-utils' | 10 | import { root } from '../../helpers/core-utils' |
11 | 11 | ||
12 | export class YoutubeDlUpdateScheduler extends AbstractScheduler { | 12 | export 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) => { |