Kodi Community Forum

Full Version: Playmedia command line
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need help understanding this command line. I am trying to add a builtin command on "The Remote For Kodi" that plays a certain playlist.

PlayMedia(media[,isdir][,1],[playoffset=xx])

The name of my playlist is 4&5 Stars.

Any help is appreciated
Not sure what to change in the command. A detailed explanation of the command would be appreciated.
This is a in-built python function which need to be used with the "kodi-send --action=....." command

So depending on your distro you are using for your RPi (and let's assume it's LibreELEC for example), SSH in and do:

Code:
kodi-send --action="Up"

You will see the highlighted menu button will move one step up. So you have to change the command between the "..." to get your PlayMedia working. Probably in that way:

Code:
kodi-send --action="PlayMedia(/some/path/to/a/file/music_file.mp3)"

If you want something at the startup of Kodi, you could use a "autexec.py" script in your userdata folder. So create a file named:

autoexec.py

and fill it with the following content:

Code:
import xbmc
xbmc.executebuiltin('XBMC.PlayMedia(/some/path/to/a/file/music_file.mp3)')

that will then be started at every startup of Kodi.

It might be, if you are using Raspbian as your OS, that you need to install the kodi-send function. I don't know if they ship it by default. While using Ubuntu 16.04 you have to install it via:

Code:
sudo apt install kodi-eventclients-kodi-send

Hope that helps a bit.
I am using osmc and trying to add the command line to "The Remote For Kodi" builtin functions. Im a bit confused by the response you gave.