Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
RPC Call to Play an Item in Favourites
#1
Hi,

I am trying to find a way to remotely execute Items from my Favourites using JSON-RPC_API. More specifically I am trying to run a http call using another computer in my local network and Play a Radio station which I have it in my Favourite list. Looking at the https://kodi.wiki/view/JSON-RPC_API/v12 I cant really find anything related with that.. Is it possible? Does anyone have any similar example?

Thank you!
Reply
#2
I did this years ago but I had to duplicate the favourites entries to do it.  If I was doing it now I guess I would do things differently and probably use python to parse the favourites.xml file and find the correct entry.

Anyway, you can call either a file or a plugin with

xml:

#file="smb://diamond/userdata/absolute80s.m3u"  ## Target station in m3u file
#file="plugin://plugin.audio.radio_de/station/3261" ## Target station is in plugin
result=$( curl -s --data-binary '{"jsonrpc": "2.0", "method": "Player.Open", "params":{"item":{"file": "'$file'"}}}, "id": 1}' -H 'content-type:application/json;' http://$KodiAddress:$KodiPort/jsonrpc)
Learning Linux the hard way !!
Reply

Logout Mark Read Team Forum Stats Members Help
RPC Call to Play an Item in Favourites0