mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2026-06-10 06:33:43 +05:30
refactor: improved windows arch specific configs and shell spawning
This commit is contained in:
@@ -201,9 +201,10 @@ export default function useDownloader() {
|
||||
|
||||
const isFlatpak = await invoke<boolean>('is_flatpak');
|
||||
const xdgDataDir = await dataDir();
|
||||
const spawnOpts = { env: { PYTHONUNBUFFERED: '1' } };
|
||||
const command = isFlatpak
|
||||
? Command.create('sh', ['-c', `${xdgDataDir}/yt-dlp/yt-dlp ${args.map(arg => `'${arg.replace(/'/g, "'\\''")}'`).join(' ')}`])
|
||||
: Command.sidecar('binaries/yt-dlp', args);
|
||||
? Command.create('sh', ['-c', `${xdgDataDir}/yt-dlp/yt-dlp ${args.map(arg => `'${arg.replace(/'/g, "'\\''")}'`).join(' ')}`], spawnOpts)
|
||||
: Command.sidecar('binaries/yt-dlp', args, spawnOpts);
|
||||
|
||||
let jsonOutput = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user