kodi plus json

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

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

Change the videoid to your video.