-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
termux-url-opener
109 lines (92 loc) · 3.84 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
#!/data/data/com.termux/files/usr/bin/bash
#Ak500
# Colors
# ----------------------------------------
BL='\e[01;90m' > /dev/null 2>&1; # Black
R='\e[01;91m' > /dev/null 2>&1; # Red
G='\e[01;92m' > /dev/null 2>&1; # Green
Y='\e[01;93m' > /dev/null 2>&1; # Yellow
B='\e[01;0m' > /dev/null 2>&1; # Blue
P='\e[01;95m' > /dev/null 2>&1; # Purple
C='\e[01;96m' > /dev/null 2>&1; # Cyan
W='\e[01;0m' > /dev/null 2>&1; # White
LG='\e[01;37m' > /dev/null 2>&1; # Light Gray
N='\e[0m' > /dev/null 2>&1; # Null
L='\033[7m' > /dev/null 2>&1; #Lines
X='\033[0m' > /dev/null 2>&1; #Closer
# ----------------------------------------
clear
echo ""
echo -e $R" _ _ _ _ _ "$N
echo -e $R" / \ / \ / \ / \ / \ "$N
echo -e $R" ( A | k | 5 | 0 | 0 )"$N
echo -e $R" \_/ \_/ \_/ \_/ \_/ "$N
echo -e $C "╔════════════════════════════════════════╗"
echo -e $G "║ ==> Project Name :Termux-YDL ║"
echo -e $G "║ ==> Author :Ak500 ║"
echo -e $G "║ ==> Github :github.com/ak500k ║"
echo -e $G "║ ==> Telegram :@geekyak2 ║"
echo -e $C "╠════════════════════════════════════════╝"
echo -e $C "╠═▶ [ Select Format:: ]"
echo -e $G "╠═▶ [1] Music Mp3♫"
echo -e $G "╠═▶ [2] Video 360p"
echo -e $G "╠═▶ [3] Video 480p"
echo -e $G "╠═▶ [4] Video 720p"
echo -e $G "╠═▶ [5] Video 1080p"
echo -e $G "╠═▶ [6] Video 2160p"
echo -e $G "╠═▶ [7] Exit Termux-YDL"
echo -e $G "╠"
printf "$G ╚═➤ $W"
while :
do
read INPUT_STRING
case $INPUT_STRING in
1)
echo "-x --no-mtime -o /data/data/com.termux/files/home/storage/shared/YouTube/%(title)s.%(ext)s -f \"bestaudio\" --extract-audio --audio-format mp3 --audio-quality 0" > ~/.config/yt-dlp/config
yt-dlp $1
echo -e $G"\n Finished...\n"$N
sleep 1
exit
;;
2)
echo "--no-mtime -o /data/data/com.termux/files/home/storage/shared/YouTube/%(title)s.%(ext)s -f \"bestvideo[height<=360][ext=mp4]+bestaudio[ext=m4a]\"" > ~/.config/yt-dlp/config
yt-dlp $1
echo -e $G"\n Finished...\n"$N
sleep 1
exit
;;
3)
echo "--no-mtime -o /data/data/com.termux/files/home/storage/shared/YouTube/%(title)s.%(ext)s -f \"bestvideo[height<=480][ext=mp4]+bestaudio[ext=m4a]\"" > ~/.config/yt-dlp/config
yt-dlp $1
echo -e $G"\n Finished...\n"$N
sleep 1
exit
;;
4)
echo "--no-mtime -o /data/data/com.termux/files/home/storage/shared/YouTube/%(title)s.%(ext)s -f \"bestvideo[height<=720][ext=mp4]+bestaudio[ext=m4a]\"" > ~/.config/yt-dlp/config
yt-dlp $1
echo -e $G"\n Finished...\n"$N
sleep 1
exit
;;
5)
echo "--no-mtime -o /data/data/com.termux/files/home/storage/shared/YouTube/%(title)s.%(ext)s -f \"bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]\"" > ~/.config/yt-dlp/config
yt-dlp $1
echo -e $G"\n Finished...\n"$N
sleep 1
exit
;;
6)
echo "--no-mtime -o /data/data/com.termux/files/home/storage/shared/YouTube/%(title)s.%(ext)s -f \"bestvideo[height<=2160][ext=mp4]+bestaudio[ext=m4a]\"" > ~/.config/yt-dlp/config
yt-dlp $1
echo -e $G"\n Finished...\n"$N
sleep 1
exit
;;
7)
break
;;
*)
echo -e "$R\n Wrong input! Please Enter again::\n$W"
esac
done