diff options
Diffstat (limited to 'server/helpers/youtube-dl')
-rw-r--r-- | server/helpers/youtube-dl/youtube-dl-cli.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/helpers/youtube-dl/youtube-dl-cli.ts b/server/helpers/youtube-dl/youtube-dl-cli.ts index 30fd1c97d..728f096b5 100644 --- a/server/helpers/youtube-dl/youtube-dl-cli.ts +++ b/server/helpers/youtube-dl/youtube-dl-cli.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import execa from 'execa' | 1 | import execa from 'execa' |
2 | import { pathExists, writeFile } from 'fs-extra' | 2 | import { ensureDir, pathExists, writeFile } from 'fs-extra' |
3 | import { join } from 'path' | 3 | import { dirname, join } from 'path' |
4 | import { CONFIG } from '@server/initializers/config' | 4 | import { CONFIG } from '@server/initializers/config' |
5 | import { VideoResolution } from '@shared/models' | 5 | import { VideoResolution } from '@shared/models' |
6 | import { logger, loggerTagsFactory } from '../logger' | 6 | import { logger, loggerTagsFactory } from '../logger' |
@@ -15,6 +15,8 @@ export class YoutubeDLCLI { | |||
15 | 15 | ||
16 | static async safeGet () { | 16 | static async safeGet () { |
17 | if (!await pathExists(youtubeDLBinaryPath)) { | 17 | if (!await pathExists(youtubeDLBinaryPath)) { |
18 | await ensureDir(dirname(youtubeDLBinaryPath)) | ||
19 | |||
18 | await this.updateYoutubeDLBinary() | 20 | await this.updateYoutubeDLBinary() |
19 | } | 21 | } |
20 | 22 | ||