1
0
mirror of https://gitlab.com/peterpt/IPTV-CHECK.git synced 2025-05-15 06:30:20 -07:00

Multiple bug fixes

This commit is contained in:
Pedro 2018-06-20 09:45:38 -05:00
parent ca28da5705
commit 80b7a6a4d7
2 changed files with 14 additions and 8 deletions

View File

@ -1,5 +1,6 @@
## IPTV-Checker (Changelog)
* v1.1 - multiple bug fixes
* v1.1 - Iptv tool will check internet speed and will auto adjust settings for better perfomance
* v1.1 - bug fixes , better cleaning of original m3u8 file before testing the streams
* v1.0 - Implemented automatic detection of xml iptv files

View File

@ -47,14 +47,14 @@ rpid=$(ps -p "$pid" -o pid= | awk '{print$1}')
if [[ "$rpid" == "$pid" ]]
then
kill $pid >/dev/null 2>&1
rm -rf $path/temp/* >/dev/null 2>&1
#rm -rf $path/temp/* >/dev/null 2>&1
exit 1
else
rm -rf $path/temp/* >/dev/null 2>&1
#rm -rf $path/temp/* >/dev/null 2>&1
exit 1
fi
else
rm -rf $path/temp/* >/dev/null 2>&1
#rm -rf $path/temp/* >/dev/null 2>&1
exit 1
fi
@ -298,8 +298,12 @@ glnk=$(grep -F "http" < "$path/temp/1" | sed '/EXTINF/d' | sed '/EXTM3U/d' | awk
#Write all the http links only to a new file so they can be checked ahead
echo "$glnk" | tr " " "\n" > "$path/temp/2"
# Counts how many links must be checked
srvnmb=$(wc -l "$path/temp/2" | awk '{print$1}')
# Counts how many lines exist in the file with links to be checked
grep "^http" $path/temp/2 > $path/temp/3
rm -rf $path/temp/2 >/dev/null 2>&1
mv "$path/temp/3" "$path/temp/2" >/dev/null 2>&1
# removes any previous temp pid files and stream captures from previous run
rm -rf "$path/temp/stream" >/dev/null 2>&1
rm -rf "$path/temp/pid.tmp" >/dev/null 2>&1
@ -307,8 +311,9 @@ echo ""
echo -e "$red""Press CTRL+C To Stop or Abort IPTV list check"
echo ""
lnknmb=$(wc -l "$path/temp/2" | awk '{print$1}')
# Starts the stream checks
for i in $(seq "$srvnmb")
for i in $(seq "$lnknmb")
do
chkf=$(sed -n "${i}p" < "$path/temp/2")
# To avoid errors in previous filter , it checks if the link starts with http , rtmp or HTTP
@ -342,9 +347,9 @@ stsz=$(wc -c "$path/temp/stream" | awk '{print$1}')
# In case stream file is less than value in bts (default is 100 bytes) then it is not valid
if [[ "$stsz" -le "$bts" ]]
then
echo -e "$green" "Link:$yellow $i$green of :$yellow$srvnmb$green is$red OFF"
echo -e "$green""Link:$yellow $i$green of :$yellow$lnknmb$green is$red OFF"
else
echo -e "$green" "Link:$yellow $i$green of :$yellow$srvnmb$green is$green ON"
echo -e "$green""Link:$yellow $i$green of :$yellow$lnknmb$green is$green ON"
#file have more than value in bts (default is 100 bytes) , then it is a valid stream , goto write file fuction
writefile
fi