From 916cbd055e284d040e04116f73e8ce506ea4675b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Thu, 28 May 2026 08:12:29 +0300 Subject: [PATCH] feat: implement downloader utility for automatic yt-dlp and ffmpeg management --- utils/downloader.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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');