Kodi Community Forum

Full Version: Set and Get Sources For Audio/Video
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to set the audio/video sources using JSON?

If set, is it possible to get the sources set via JSON?

Trying to integrate XBMC in Automation software
Getting is possible using Files.GetSources.
Adding and/or changing sources is currently not possible.
Ok thanks, got it working using below

curl -i -X POST -H "Content-Type: application/json" -d "{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetSources\", \"params\": {\"media\": \"video\"}, \"id\": 1}" http://192.168.80.155:80/jsonrpc
HTTP/1.1 200 OK
Content-Length: 377
Content-Type: application/json
Date: Wed, 11 Dec 2013 15:50:11 GMT

{"id":1,"jsonrpc":"2.0","result":{"limits":{"end":4,"start":0,"total":4},"sources":[{"file":"/home/pi/Video/","label":"Video"},{"file":"upnp://915f7219-1615-4f30-af6d-4c526315c691/37/","label":"LinuxMCE via MediaTomb"},{"file":"smb://DCEROUTER/public/videos/","label":"videos"}]}}