Advertisement
v1ral_ITS

ITS_ batch version dl [ shell script ]

Sep 2nd, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.12 KB | None | 0 0
  1. #!/bin/bash
  2. ####################################
  3. #                      #
  4. # START                #
  5. # g0ne_@p0stal <v1ral_ITS>         #
  6. # ImPerialTeKSolutions@outlook.com #
  7. #                  #
  8. ####################################
  9.  
  10. needed_tool='youtube-dl yad kdialog ffmpeg'
  11. require_tools ()
  12. {
  13.     local NOT_AVAIL=""
  14.     for TOOL in $needed_tool; do
  15.         if [ "`which $TOOL 2> /dev/null`" == "" ]; then NOT_AVAIL="$NOT_AVAIL $TOOL"; fi
  16.     done
  17.     if [[ "$NOT_AVAIL" != "" ]]; then
  18.         echo "ERROR: The following required tool(s) cannot be found: $NOT_AVAIL"
  19.         exit 3
  20.     fi
  21. }
  22.  
  23. # Check If Package Downloaded
  24. require_tools
  25.  
  26. # Download URL
  27. read batch_list < <( zenity --title " ITS_ Download Program " --width=560 --text " Copy Paste batch list in your, '\$HOME\', directory." --forms --add-entry " FILE: " )
  28.  
  29. # Download Of Files Location
  30. cd "$(yad --title "Change Directory To Download Destination" --file-selection --directory)"
  31.  
  32. # Start Program Here
  33. time youtube-dl --ignore-config --hls-prefer-native --add-metadata -i -c --yes-playlist --external-downloader aria2c -a $HOME/$batch_list  | pv -tpeba -s 100M
  34. ding
  35.  
  36. # Cleanup
  37. rm $HOME/$batch_list
  38.  
  39. # Exit
  40. exit $?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement