Closed clpacheco90 closed 10 months ago
Solved. I need to put cwd
on youtubedl
Here is:
const { create: createYoutubeDl } = require('youtube-dl-exec')
let download = async function($scope, value, eachCallback) {
/**
* Youtube-dl has been deprecated use yt-dlp instead
*/
let currentDirname = path.dirname(remote.getGlobal('globalPath'));
var linux = path.join('global', 'linux', 'yt-dlp');
var win32 = path.join('global', 'win32', 'yt-dlp.exe');
var youtubedlPath = (process.platform === 'win32') ? win32 : linux;
let youtubedl = createYoutubeDl(youtubedlPath);
...
let update = await youtubedl('', { update: true }, { cwd: currentDirname });
...
Hi,
I'm having a issue when run the package on folder with space, like "Program Files". This issue occurs on Linux and Windows.
Here is a path that is not working:
"C:\Program Files\my-app\global\win32\yt-dlp.exe"
But here is working:"C:\my-app\global\win32\yt-dlp.exe"
Here is a path that is not working:
"/home/my app/global/linux/yt-dlp"
But here is working:"/home/my-app/global/linux/yt-dlp"
I tried to use some methods like "\" on linux but nothing works for me.
Here is a sample of my code.
can you help?