B.K.Johnsohn wrote
As it stands my code downloads videos to the root folder.1. What is the default download directory?
2. Can it be changed/ If yes, how?
To find out how to change that, we need to delve into the youtube-dl documentation
https://github.com/rg3/youtube-dl/blob/ ... fic-folder
FAQ
How do I put downloads into a specific folder?
Use the -o to specify an output template, for example -o "/home/user/videos/%(title)s-%(id)s.%(ext)s".
If you want this for all of your downloads, put the option into your configuration file.
https://github.com/rg3/youtube-dl/blob/ ... figuration
For our example:
Make sure you first create a Videos folder (that you can write to) in root
Code: Select all
#!/bin/bash
dialog=$(yad --title "You Tube Download" --form --field="Paste address")
address=$(echo $dialog)
youtube-dl "$address" -o "/root/Videos/%(title)s-%(id)s.%(ext)s" | yad --title "Download" --progress --pulsate