2019-04-03, 12:53
Hi Everyone,
Hopefully some of you clever guys can help me out. I have Kodi running on a Rpi (Libreelec) and what I had a script running that checked if there was any video playing on Kodi.
My script is:
The problem I am having is that since LEIA came out, this is not working anymore. The variable is returning:
Any ideas what could be the problem?
Hopefully some of you clever guys can help me out. I have Kodi running on a Rpi (Libreelec) and what I had a script running that checked if there was any video playing on Kodi.
My script is:
Code:
playing=1
myvar=""
myvar=$(curl -s -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "method": "Player.GetItem", "params":{"properties": ["tvshowid"], "playerid": 1}, "id": "VideoGetItem"}' http://[username]:[pass]@127.0.0.1:58080/jsonrpc)
case "$myvar" in
*unknown*) playing=0 ;;
* ) ;;
esac
while $playing == 1 (wiki)
do
myvar=""
myvar=$(curl -s -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "method": "Player.GetItem", "params":{"properties": ["tvshowid"], "playerid": 1}, "id": "VideoGetItem"}' http://[username]:[pass]@127.0.0.1:58080/jsonrpc);
case "$myvar" in
*unknown*) playing=0 ;;
* ) ;;
esac
sleep 900
done
The problem I am having is that since LEIA came out, this is not working anymore. The variable is returning:
Code:
MyPI:~/.config # $myvar
-sh: <html><head><title>File: not found
Any ideas what could be the problem?