Kodi Community Forum
Solved Correct syntax for 'Action' built-in? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Solved Correct syntax for 'Action' built-in? (/showthread.php?tid=188401)



Correct syntax for 'Action' built-in? - Roman_V_M - 2014-03-07

I've found the following info in Wiki: http://wiki.xbmc.org/index.php?title=List_of_built-in_functions
Quote:Action | Executes an action for the active window (same as in keymap)

But what is the correct syntax for this? My goal is to call ToggleWatched action from my plugin for the current item, but the syntax:
PHP Code:
xbmc.executebuiltin('Action(ToggleWatched)'
does not work. Am I missing something and what is a correct way to toggle watched status for an item?
I know about the 'playcount' property of ListItem, but it seems that it cannot be set for a file item, but only for a media library item, and videos from my plugin are not in library.


RE: Correct syntax for 'Action' built-in? - MassIV - 2014-03-07

Tossing that line into google gives:

https://github.com/trakt/script.trakt/blob/master/script.py#L292


RE: Correct syntax for 'Action' built-in? - Roman_V_M - 2014-03-08

(2014-03-07, 23:56)MassIV Wrote: Tossing that line into google gives:

https://github.com/trakt/script.trakt/blob/master/script.py#L292

Thanks. I've found the answer myself: the syntax above is correct, but the action didn't work due to an unrelated bug in my plugin.