Update I made this:
curl -s "http://192.168.11.93:436/getmovieplayinfo?" | grep -Po '(?<=,"total_time":)(.*?)(?=})'
and this gave me number 5757, what will be code after this to check "if > 500 then" ?
Old question:
I need help to create bash script and run script if number from curl response is > 500.
I want script looks like this:
if curl "http://192.168.11.93:436/getmovieplayinfo?" and if total_time is > 500
then
echo "run run run"
fi
This is response from curl:
{"success":true,"msg":"","playinfo":{"bd_file_path":"","file_path":"BDMV","e_play_status":0,"e_play_mode":0,"cur_time":5,"total_time":5757}}
Thank you for help.