Repository navigation
Expand file tree
/
Copy pathPLGLin.sh
More file actions
70 lines (70 loc) · 1.51 KB
/
Copy pathPLGLin.sh
File metadata and controls
70 lines (70 loc) · 1.51 KB
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
echo "PLS generator for Linux, V1.1"
sleep 0.5
echo "Released 15.08.24."
sleep 0.6
echo "If you are using the app for the first time, please read the included readme."
sleep 1.5
echo "Enter filename, remember, it can't be changed during the creation."
read -p "" file
echo "Name of your file is $file"
echo "Enter station address:"
read -p "" address
echo "Enter station title:"
read -p "" title
while true; do
echo "Data: Station address: $address, Station Name: $title. Everything's right? Y/N"
read response
if [ "$response" = "y" ]; then
break
else
echo "What do you want to change? 1. Address URL, 2. Title"
read -p " " change_choice
case $change_choice in
1)
echo "Enter new station address:"
read -p "" address
;;
2)
echo "Enter new station title:"
read -p "" title
;;
*)
echo "Invalid choice, please select 1 or 2."
;;
esac
fi
done
while true; do
echo "Select file type: 1. PLS, 2. M3U."
read -p " " choice
case $choice in
1)
echo "[playlist]" > "$file.pls"
echo "NumberOfEntries=1" >> "$file.pls"
echo "File1=$address" >> "$file.pls"
echo "Title1=$title" >> "$file.pls"
echo "File has been created."
sleep 0.6
echo "Thanks for using PLS Generator."
sleep 1.5
echo "Check our website: https://sp.tdprograms.ovh"
sleep 4
exit
;;
2)
echo "#EXTM3U" > "$file.m3u"
echo "#EXTINF:, - $title" >> "$file.m3u"
echo "$address" >> "$file.m3u"
echo "File has been created."
sleep 0.6
echo "Thanks for using PLS Generator."
sleep 1.5
echo "Check our website: https://sp.tdprograms.ovh"
sleep 4
exit
;;
*)
echo "Wronk choice, try again."
;;
esac
done