Advertisement
Al_Tasin

termux-url-opener

Jun 16th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.28 KB | None | 0 0
  1. #!/data/data/com.termux/files/usr/bin/bash
  2. # Copyright 2017 Gabi Tiplea
  3.  
  4. echo -e "\033[1;31m"
  5. echo    "__   __          _         _            "
  6. echo    "\ \ / /__  _   _| |_ _   _| |__   ___   "
  7. echo    " \ V / _ \| | | | __| | | | '_ \ / _ \  "
  8. echo    "  | | (_) | |_| | |_| |_| | |_) |  __/  "
  9. echo    "  |_|\___/ \__,_|\__|\__,_|_.__/ \___|  "
  10. echo "  "
  11. echo "Made by Al-Tasin"
  12. echo -e "\033[1;33m"
  13. echo "For audio only press 1"
  14. echo "For video 360p press 2"
  15. echo "For video 480p press 3"
  16. echo "For video 720p press 4"
  17. echo "For video 1080p press 5"
  18.  
  19. command='-no-mtime -o /data/data/com.termux/files/home/storage/shared/Youtube/%(title)s.%(ext)s -f'
  20. read option
  21.  
  22. if [ "$option" -eq "1" ]
  23. then
  24.     echo "$command 140" > ~/.config/youtube-dl/config
  25.     youtube-dl $1
  26.  
  27. elif [ "$option" -eq "2" ]
  28. then
  29.     echo "$command \"best[height<=360]\"" > ~/.config/youtube-dl/config
  30.     youtube-dl $1
  31.  
  32. elif [ "$option" -eq "3" ]
  33. then
  34.     echo "$command \"best[height<=480]\"" > ~/.config/youtube-dl/config
  35.     youtube-dl $1
  36.  
  37. elif [ "$option" -eq "4" ]
  38. then
  39.     echo "$command \"best[height<=720]\"" > ~/.config/youtube-dl/config
  40.     youtube-dl $1
  41.  
  42. elif [ "$option" -eq "5" ]
  43. then
  44.     echo "$command \"best[height<=1080]\"" > ~/.config/youtube-dl/config
  45.     youtube-dl $1
  46. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement