mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2026-09-03 20:53:09 -05:00
Ensure bin dir exists before dl youtube-dl
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import execa from 'execa'
|
||||
import { pathExists, writeFile } from 'fs-extra'
|
||||
import { join } from 'path'
|
||||
import { ensureDir, pathExists, writeFile } from 'fs-extra'
|
||||
import { dirname, join } from 'path'
|
||||
import { CONFIG } from '@server/initializers/config'
|
||||
import { VideoResolution } from '@shared/models'
|
||||
import { logger, loggerTagsFactory } from '../logger'
|
||||
@@ -15,6 +15,8 @@ export class YoutubeDLCLI {
|
||||
|
||||
static async safeGet () {
|
||||
if (!await pathExists(youtubeDLBinaryPath)) {
|
||||
await ensureDir(dirname(youtubeDLBinaryPath))
|
||||
|
||||
await this.updateYoutubeDLBinary()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user