Quantcast
Channel: Kodi Community Forum - All Forums
Viewing all articles
Browse latest Browse all 84005

Call built-in functions and open music playlist

$
0
0
Hey guys,
I just started a project that requires remote controlling my XBMC instance (so please excuse me being a naive beginner here). I got most of the things working (using the JSON methods and input actions) by looking endlessly through this forum, except I still can't get one thing to work:

How can I call a built-in function using the JSON-RPC API, more specifically the PlayMedia() function? I want to open one of my music playlists remotely.

Code:
<keymap><global><keyboard><r>PlayMedia(special://musicplaylists/myplaylist.m3u)</r></keyboard></global></keymap>
Defining it in the keymaps/keybard.xml does work, but that still doesn't provide me with access from the remote command line

Code:
curl "http://192.168.1.12/xbmcCmds/xbmcHttp?command=ExecBuiltIn(PlayMedia(path/to/playlist/playlist.m3u))"
is being depreciated/not working anymore with Frodo, so not an option. With that in mind I imagine that the purpose of the JSON API is exactly not to have to call the built-in functions but at this point this makes it unfortunately trickier for me.

So I tried
Code:
{"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"file":"Path/to/playlist/playlist.m3u"}}}

but that causes the screen to go black and just stand there idle. Using this call with a single .mp3 file works fine.

I checked the method list for the JSON-API and the Input actions but nothing seems to fit my purpose (does files.media have something to do with it?). So does somebody know how to call built-in functions or how to open a music playlist using the json api (Input.builtin or Open.playlist Tongue )
Thanks in advance

Jaden

Viewing all articles
Browse latest Browse all 84005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>