diff --git a/utils/downloader.js b/utils/downloader.js index c4f996f..c7dd3b3 100644 --- a/utils/downloader.js +++ b/utils/downloader.js @@ -2,8 +2,12 @@ const { spawn, exec } = require('child_process'); const path = require('path'); const fs = require('fs'); const https = require('https'); +const { app } = require('electron'); + +const BIN_DIR = app && app.isPackaged + ? path.join(process.resourcesPath, 'app.asar.unpacked', 'bin') + : path.join(__dirname, '..', 'bin'); -const BIN_DIR = path.join(__dirname, '..', 'bin'); const YTDLP_PATH = path.join(BIN_DIR, 'yt-dlp.exe'); const FFMPEG_PATH = path.join(BIN_DIR, 'ffmpeg.exe');