I try to set some smart home rules which are only available if no movie or PVR runs in Kodi.
Normally the whole day online radio (.m3u) is running. If I ask kodi what is running (node-red) kodi tells me that it is a movie (payload.data.data.item.type). Is there another way to get the kind of media that is running?
This would be better asked in the JSON-RPC section so the people in the know have more chance to see it.
I'll move it there.
This section of the forum is a general everything concerning Kodi and not specifically a support thread. I think your query might be the
music add-on section. Here's a
link that might help.
Darrin suggested JSON-RPC which might be appropriate.
Hi PatK I don't need help for a radio addon. Becaus the stream works fine. I only need a way to check what type of media is currently playing.
I need this Information to be able to tell my robot vacuum cleaner that he should not clean while a movie runs.
Could you please share the m3u file you are using for radio playback, I can run some tests and probably find something.
m3u:
#EXTM3U
http://mp3.radio.ch/radiozuerisee128k
I use Kodi as Radio which runs most of the day. Because the TV power off if the screen shows the same Image a long time, I have visualization active.
I thought I could modifie this request I already use:
json:
"jsonrpc":"2.0",
"id":1,
"method":"XBMC.GetInfoLabels",
"params":
{"labels":["player.title",]},
Into:
json:
"jsonrpc":"2.0",
"id":1,
"method":"XBMC.GetInfoBooleans",
"params":
{"xbmc.getCondVisibility":["Player.HasVideo",]},
But that seems not working.
Do you know how I have to form the Request?
sure, you're close..you just need to change the name of the param to booleans
json:
"params":{"booleans":["Player.HasVideo"]}