forked from localhosthack0r/kingofsat2satip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getchannels_fta_changes.sh
49 lines (47 loc) · 1.24 KB
/
getchannels_fta_changes.sh
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
#!/bin/bash
DATE_D=date +%F
DATE_T=date +%T
# configure SATIP server name/IP address, here
SERVER="192.168.1.113"
#SERVER="192.168.178.42"
# cleanup old files
rm -r 1 2 3 4
mkdir 1 2 3 4
rm *.php
rm *.m3u
rm /tmp/*.m3u
P1=13.0E
P2=19.2E
P3=23.5E
P4=28.2E
#tv-13.0E-fta.php
declare -a P
P=($P1 $P2 $P3 $P4 )
# download PHP files from kingofsat
cd 1
wget https://de.kingofsat.net/tv-$P1-fta.php
python ../getchannels.py $SERVER tv-$P1-fta.php 1
cd ..
cd 2
wget https://de.kingofsat.net/tv-$P2-fta.php
python ../getchannels.py $SERVER tv-$P2-fta.php 2
cd ..
cd 3
wget https://de.kingofsat.net/tv-$P3-fta.php
python ../getchannels.py $SERVER tv-$P3-fta.php 3
cd ..
cd 4
wget https://de.kingofsat.net/tv-$P4-fta.php
python ../getchannels.py $SERVER tv-$P4-fta.php 4
cd ..
mkdir LANG FTA
cp */*.m3u .
cat *.m3u > allChannels.m3u
mkdir FTA/$(date +%F)
sed 's/pol=V/pol=v/g' allChannels.m3u > /tmp/allChannels.m3u && sed 's/pol=H/pol=h/g' /tmp/allChannels.m3u > FTA/$(date +%F)/ALL_FTA_$P1-$P2-$P3-$P4-$(date +%F)-$(date +%M).m3u
for i in "${P[@]}";
do
sed 's/pol=V/pol=v/g' tv-$i-fta.m3u > /tmp/tv-$i-fta.m3u && sed 's/pol=H/pol=h/g' /tmp/tv-$i-fta.m3u > FTA/$(date +%F)/TV-$i-FTA-$(date +%F)-$(date +%M).m3u
done
rm tv-*-fta.m3u allChannels.m3u
rm -r 1/ 2/ 3/ 4/ *.m3u