aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/youtube-dl/youtube-dl-cli.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/youtube-dl/youtube-dl-cli.ts')
-rw-r--r--server/helpers/youtube-dl/youtube-dl-cli.ts6
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 @@
1import execa from 'execa' 1import execa from 'execa'
2import { pathExists, writeFile } from 'fs-extra' 2import { ensureDir, pathExists, writeFile } from 'fs-extra'
3import { join } from 'path' 3import { dirname, join } from 'path'
4import { CONFIG } from '@server/initializers/config' 4import { CONFIG } from '@server/initializers/config'
5import { VideoResolution } from '@shared/models' 5import { VideoResolution } from '@shared/models'
6import { logger, loggerTagsFactory } from '../logger' 6import { 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