kodi plus json

Play a Youtube video on Kodi, by sending a JSON-RPC request with Python.

pip install "jsonrpcclient[requests]"
>>> from jsonrpcclient.clients.http_client import HTTPClient
>>> params = {"file": "plugin://plugin.video.youtube/?action=play_video&videoid=QwSazmPRfaI"}
>>> HTTPClient("http://kodi:8080/jsonrpc").request("Player.Open", item=params).data.result
'OK'

Change the videoid to your video.