[SOLVED] Kodi binding - playfavorite in rules, what is the syntax?

I would like to play a certain favorite (lets call it Favorite1) which is a radio station, in a rule.
I managed to play it with playuri:


but as you can see its ugly.
is it posible to have something like
myKodi_playfavorite. - how to tell him to play Favorite1 ?

I have playfavorite as a selection in sitemap and it works nice, but I have to select a favorite which I want to play.


If I understand the question correctly, you can create a map file and use the transform Action to convert “Favorite1” to “plugin://…”.

Hi Vanja,

The favorite selection is populated dynamically during runtime. In general all options - so called StateOptions - are a list of label and value pairs (label and value are the same in Kodi binding). You can use the same item to send a command (=value) of your favorite towards Kodi:


It is possible to access the whole list of state options in a rule and work with them:

myKodi_playfavorite.getStateDescription.getOptions.forEach[option |
    logInfo("kodi", "Favorite: [label='{}', valueid='{}']", option.getLabel, option.getValue)

thanks a lot! works great!