cyp
cyp copied to clipboard
Use configured youtube folder for downloading
The download routine had the target folder hardcoded to "_youtube", not respecting the ytPath variable in conf.ts.
Fix this by propagating the configured folder to the downloader.
Limit it to a single, non-relative, folder for safety. Probably still not very secure, but as I know next to nothing about nodejs, I saw no other means to respect the ytPath variable.
I am currently on a vacation until the end of August. Acknowledging the issue, will look into it when I come back.
As far as I remember, the URLSearchParams interface performs necessary escaping automatically (also, escape is probably incorrect; the right one would be encodeURIComponent).