e-alfred / ocdownloader

ocDownloader - AGPL-licensed multi-protocol download manager for Nextcloud using ARIA2, youtube-dl and Curl (supports Youtube, BitTorrent, HTTP, FTP)
https://github.com/e-alfred/ocdownloader
GNU Affero General Public License v3.0
375 stars 85 forks source link

Empty Setting in Audio and Video causing an error #219

Open GAS85 opened 3 years ago

GAS85 commented 3 years ago
### Steps to reproduce 1. As mentioned in #187 go to Admin Settings > Additional > ocDownloader 2. Live empty Audio and Video fields: ![grafik](https://user-images.githubusercontent.com/6813635/133217519-7d3d8bbd-6db8-41d2-bb8d-6531fbadd110.png) 3. See an error "Unable to get correct audio URL YouTube" ![grafik](https://user-images.githubusercontent.com/6813635/133217836-4d9eee87-c6ce-405c-87d7-3d516ce5c1cc.png) ### Expected behaviour Video still downloaded with default settings - no setting for audio and video: Command to execute should looks like ```bash sh -c /usr/local/bin/youtube-dl -i 'https://www.youtube.com/watch?v=xxxxxxxxxx' --get-url --get-filename -4 ``` ### Actual behaviour Faulty command will be produced that breaks youtube-DL execution. `-f` should not be pushed without any parameter in this case (see Expected behaviour) ```bash sh -c /usr/local/bin/youtube-dl -i 'https://www.youtube.com/watch?v=xxxxxxxxxx' --get-url --get-filename -f -4 ``` Command line error will be produced: ```bash /usr/local/bin/youtube-dl -i 'https://www.youtube.com/watch?v=xxxxxxxxxx' --get-url --get-filename -f -4 ERROR: requested format not available ``` ### Server configuration **Operating system**: Ubuntu 20.04 **Nextcloud version:** 21.04 #### ocDownloader configuration: **Which downloader are you using:** Curl **Do you use a proxy:** No **Which protocols do you allow**: FTP/HTTP/Youtube