diff options
Diffstat (limited to 'server/lib/schedulers')
-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) => { |