mirror of
https://gitlab.com/peterpt/IPTV-CHECK.git
synced 2025-05-15 13:10:09 -07:00
Multiple bug fixes
This commit is contained in:
parent
ca28da5705
commit
80b7a6a4d7
@ -1,5 +1,6 @@
|
|||||||
## IPTV-Checker (Changelog)
|
## 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 - 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.1 - bug fixes , better cleaning of original m3u8 file before testing the streams
|
||||||
* v1.0 - Implemented automatic detection of xml iptv files
|
* v1.0 - Implemented automatic detection of xml iptv files
|
||||||
|
21
iptv-check
21
iptv-check
@ -47,14 +47,14 @@ rpid=$(ps -p "$pid" -o pid= | awk '{print$1}')
|
|||||||
if [[ "$rpid" == "$pid" ]]
|
if [[ "$rpid" == "$pid" ]]
|
||||||
then
|
then
|
||||||
kill $pid >/dev/null 2>&1
|
kill $pid >/dev/null 2>&1
|
||||||
rm -rf $path/temp/* >/dev/null 2>&1
|
#rm -rf $path/temp/* >/dev/null 2>&1
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
rm -rf $path/temp/* >/dev/null 2>&1
|
#rm -rf $path/temp/* >/dev/null 2>&1
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
rm -rf $path/temp/* >/dev/null 2>&1
|
#rm -rf $path/temp/* >/dev/null 2>&1
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
#Write all the http links only to a new file so they can be checked ahead
|
||||||
echo "$glnk" | tr " " "\n" > "$path/temp/2"
|
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
|
# 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/stream" >/dev/null 2>&1
|
||||||
rm -rf "$path/temp/pid.tmp" >/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 -e "$red""Press CTRL+C To Stop or Abort IPTV list check"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
lnknmb=$(wc -l "$path/temp/2" | awk '{print$1}')
|
||||||
# Starts the stream checks
|
# Starts the stream checks
|
||||||
for i in $(seq "$srvnmb")
|
for i in $(seq "$lnknmb")
|
||||||
do
|
do
|
||||||
chkf=$(sed -n "${i}p" < "$path/temp/2")
|
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
|
# 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
|
# In case stream file is less than value in bts (default is 100 bytes) then it is not valid
|
||||||
if [[ "$stsz" -le "$bts" ]]
|
if [[ "$stsz" -le "$bts" ]]
|
||||||
then
|
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
|
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
|
#file have more than value in bts (default is 100 bytes) , then it is a valid stream , goto write file fuction
|
||||||
writefile
|
writefile
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user