fix regression

This commit is contained in:
genio
2021-11-18 22:11:46 +01:00
parent 919ddd6fc3
commit d4a637dbfc

View File

@@ -9,8 +9,10 @@ catch (e) {
console.warn("settings.json not found") console.warn("settings.json not found")
} }
const isWindows = process.platform === 'win32';
const download = (socket, url) => { const download = (socket, url) => {
const ytldp = spawn('./lib/yt-dlp.exe', const ytldp = spawn(`./lib/yt-dlp${isWindows ? '.exe' : ''}`,
['-o', `${settings.download_path || './downloads/'}%(title)s.%(ext)s`, url] ['-o', `${settings.download_path || './downloads/'}%(title)s.%(ext)s`, url]
) )