-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathtermux-url-opener
executable file
·134 lines (116 loc) · 4.6 KB
/
termux-url-opener
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# COLORS
GREEN="\e[32m"
CYAN="\e[36m"
MAGENTA="\e[35m"
YELLOW="\e[33m"
BLUE="\e[34m"
RED="\e[31m"
# BOLD COLORS
GREEN_B="\e[01;32m"
CYAN_B="\e[01;36m"
MAGENTA_B="\e[01;35m"
YELLOW_B="\e[01;33m"
BLUE_B="\e[01;34m"
RED_B="\e[01;31m"
# RESET
RESET="\e[0m"
clear
command -v yt-dlp || printf "${RED_B} Please install yt-dlp manually or run the the install.sh script again.\n${RESET}"
OUTPUT_PATH="/storage/emulated/0/Youtube"
echo -e "${RED}" " ▄▀▄ ▄▀▄"
echo -e "${RED}" " ▄█░░▀▀▀▀▀░░█▄"
echo -e "${RED}" " ▄▄ █░░░░░░░░░░░█ ▄▄"
echo -e "${RED}" " █▄▄█ █░░█░░┬░░█░░█ █▄▄█"
echo -e "${CYAN}" "╔════════════════════════════════════════╗"
echo -e "${GREEN}" "║ ♚ Project Name : 🆃🅴🆁🅼🆄🆇-🆈🆃🅳™ ║"
echo -e "${GREEN}" "║ ♚ Author : KhanSaad1275 ║"
echo -e "${GREEN}" "║ ♚ Github : g̲i̲t̲h̲u̲b̲.̲c̲o̲m̲/̲k̲h̲a̲n̲s̲a̲a̲d̲1̲2̲7̲5̲/̲ ║"
echo -e "${GREEN}" "║ ♚ Website : www.LearnTermux.tech ║"
echo -e "${CYAN}" "╠════════════════════════════════════════╝"
echo -e "${CYAN}" "╠═▶ [𝗦𝗲𝗹𝗲𝗰𝘁 𝗔 𝗙𝗼𝗿𝗺𝗮𝘁] ➳"
echo -e "${GREEN}" "╠═▶ 1. Music Mp3♫"
echo -e "${GREEN}" "╠═▶ 2. Video 360p"
echo -e "${GREEN}" "╠═▶ 3. Video 480p"
echo -e "${GREEN}" "╠═▶ 4. Video 720p"
echo -e "${GREEN}" "╠═▶ 5. Video 1080p"
echo -e "${GREEN}" "╠═▶ 6. Video 2160p"
echo -e "${GREEN}" "╠═▶ 7. Exit Termux-YTD" # Added
#Edit From Oak Atsume
printf "${GREEN} ╚═:➤ ${RESET}"
read option
if [[ -z $option ]];
then
clear
printf "${RED_B} Please choose a option!\n${RESET}"
else
case $option in #Make Case list
1)
yt-dlp -f 140 $1
;;
2)
yt-dlp -f "best[height<=360]" $1
;;
3)
yt-dlp -f "best[height<=480]" $1
;;
4)
yt-dlp -f "best[height<=720]" $1
;;
5)
yt-dlp -f "best[height<=1080]" $1
;;
6)
yt-dlp -f "best[height<=2160]" $1
;;
7)
exit 0
;;
esac
fi
if [ $? -eq 0 ]; then
printf "${GREEN_B}Files correctly downloaded at ${OUTPUT_PATH} !${RESET}\n"
else
printf "${RED_B}An error occurred when downloading the files!${RESET}\n"
exit 0
fi
if [ $(echo -n $TERMUX_API_VERSION | wc -c ) -gt 1 ]; then
printf "${YELLOW_B}Scanning ${OUTPUT_PATH}${RESET}\n"
termux-media-scan -v -r "${OUTPUT_PATH}"
if [ $? -eq 0 ]; then
printf "${GREEN_B}${OUTPUT_PATH} correctly scanned${RESET}\n"
else
printf "${RED_B}An error occurred during the ${OUTPUT_PATH} scanning${RESET}\n"
fi
fi
printf "${MAGENTA_B}Program completed. Press any key to exit.${RESET}\n"
read x
#There's a cat on the code!!
# ▄▀▄ ▄▀▄
# ▄█░░▀▀▀▀▀░░█▄
# ▄▄ █░░░░░░░░░░░█ ▄▄
# █▄▄█ █░░█░░┬░░█░░█ █▄▄█
#Oh hey there It's me Oak I have no idea how youtube-dl (now yt-dlp) works but i came across this github an,and edited a few things hope it helps :D
#I wanted to mess a little with the Download code but didn't
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
#There's another cat on the code!! (this one is prepared to fight)
# ───▄▄─▄████▄▐▄▄▄▌
# ──▐──████▀███▄█▄▌
# ▐─▌──█▀▌──▐▀▌▀█▀
# ─▀───▌─▌──▐─▌
# ─────█─█──▐▌█
# Hi, I'm cosmic3d
# I was just wondering if there was any cool way of downloading youtube videos without the need to
# visit these awful and uncomfortable websites infested with ads.
# I found this repository and realized there was an unsolved error related with the youtube-dl command.
# I was really bored and I thought this would be really useful for me, so if you dont
# merge my changes its okay :)
# ,_,
# (O,O)
# ( )
# -"-"
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
#email: Kamilohulau@gmail.com
#Date: Wed Dec 2 15:48:19 PST 2020#
#Project name : Termux-YTD#
#Github: https://github.com/khansaad1275/Termux-YTD#
# -----------------------------------------------------