List of built-in functions: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 23: Line 23:
! Version
! Version
|-
|-
| <code>Help</code>
| <code>Action(action[,window])</code>
| This help message (??? probably broken)
| Executes an action (same as in keymap) for the given window or the active window if the parameter window is omitted. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See here for a list of window names, and their respective ids.
|
|-
| <code>ActivateScreensaver</code>
| Starts the screensaver
| {{nowrap|v13 Addition}}
|-
| <code>ActivateWindow(window[,dir,return])</code>
| Opens the given window. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See here for a list of window names, and their respective ids. If, furthermore, the window is Music, Video, Pictures, or Program files, then the optional dir parameter specifies which folder Kodi should default to once the window is opened. This must be a source as specified in sources.xml, or a subfolder of a valid source. For some windows (MusicLibrary and VideoLibrary), the return parameter may be specified, which indicates that Kodi should use this folder as the "root" of the level, and thus the "parent directory" action from within this folder will return the user to where they were prior to the window activating.
|  
|  
|-
|-
| <code>Reboot</code>
| <code>ActivateWindowAndFocus(id1, id2,item1, id3,item2)</code>
| Cold reboots the system (power cycle)
| Activate window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0).
|
| {{nowrap|v12 Addition}}
|-
|-
| <code>ShutDown</code>
| <code>Addon.Default.OpenSettings</code>
| Trigger default Shutdown action defined in System Settings
| Open a settings dialog for the default addon of the given type
|
|  
|-
|-
| <code>Powerdown</code>
| <code>Addon.Default.Set</code>
| Powerdown system
| Open a select dialog to allow choosing the default addon of the given type
|
|  
|-
|-
| <code>Quit</code>
| <code>Addon.OpenSettings(id)</code>
| Quits Kodi
| Open a settings dialog for the addon of the given id
|
|  
|-
|-
| <code>Hibernate</code>
| <code>AlarmClock(name,command,time[,silent,loop])</code>
| Hibernate (S4) the System
| Pops up a dialog asking for the length of time for the alarm (unless the parameter time is specified), and starts a timer. When the timer runs out, it'll execute the built-in command (the parameter command) if it is specified, otherwise it'll pop up an alarm notice. Add silent to hide the alarm notification. Add loop for the alarm to execute the command each time the specified time interval expires.
|
|  
|-
|-
| <code>Suspend</code>
| Suspends (S3 / S1 depending on bios setting) the System
|
|-
| <code>InhibitIdleShutdown(true/false)</code>
| Prevent the system to shutdown on idle.
| {{nowrap|v12 Addition}}
|-
| <code>AllowIdleShutdown</code>
| <code>AllowIdleShutdown</code>
| Allow the system to shutdown on idle.
| Allow the system to shutdown on idle.
| {{nowrap|v12 Addition}}
| {{nowrap|v12 Addition}}
|-
|-
| <code>ActivateScreensaver</code>
| <code>CancelAlarm(name[,silent])</code>
| Starts the screensaver
| Cancel a running alarm. Set silent to true to hide the alarm notification.
|
|-
| <code>CECActivateSource</code>
| Wake up playing device via a CEC peripheral
| {{nowrap|v13 Addition}}
|-
| <code>CECStandby</code>
| Put playing device on standby via a CEC peripheral
| {{nowrap|v13 Addition}}
|-
| <code>CECToggleState</code>
| Toggle state of playing device via a CEC peripheral
| {{nowrap|v13 Addition}}
| {{nowrap|v13 Addition}}
|-
|-
| <code>RestartApp</code>
| <code>CleanLibrary(database)</code>
| Restarts Kodi (only implemented under Windows and Linux)
| This funtion will perform a number of 'cleanup' tasks on your video database and can be run if you have moved, deleted or renamed files. Takes either "video" or "music" as a parameter to begin cleaning the corresponding database.
|
|  
|-
|-
| <code>Minimize</code>
| <code>ClearProperty(key[,id])</code>
| Minimizes Kodi
| Clears a window property for the current focused window/dialog(key), or the specified window (key,id).
|
|  
|-
|-
| <code>Reset</code>
| <code>Container.NextSortMethod</code>
| Reset the system (same as reboot)
| Change to the next sort method.
|
|  
|-
|-
| <code>Mastermode</code>
| <code>Container.NextViewMode</code>
| Runs Kodi in master mode
| Select the next view mode.
|
|  
|-
|-
| <code>SetGUILanguage</code>
| <code>Container.PreviousSortMethod</code>
| Set GUI Language
| Change to the previous sort method.
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>ActivateWindow(window[,dir,return])</code>
| <code>Container.PreviousViewMode</code>
| Opens the given window. The parameter window can either be the window's id, or in the case of a standard window, the window's name. [[Window IDs|See here for a list of window names, and their respective ids.]] If, furthermore, the window is Music, Video, Pictures, or Program files, then the optional dir parameter specifies which folder Kodi should default to once the window is opened. This must be a source as specified in sources.xml, or a subfolder of a valid source. For some windows (MusicLibrary and VideoLibrary), the return parameter may be specified, which indicates that Kodi should use this folder as the "root" of the level, and thus the "parent directory" action from within this folder will return the user to where they were prior to the window activating.
| Select the previous view mode.  
|
|  
|-
| <code>ActivateWindowAndFocus(id1, id2,item1, id3,item2)</code>
| Activate window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0).
| {{nowrap|v12 Addition}}
|-
|-
| <code>ReplaceWindow(window,dir)</code>
| <code>Container.Refresh</code>
| Replaces the current window with the given window. This is the same as ActivateWindow() but it doesn't update the window history list, so when you go back from the new window it will not return to the previous window, rather will return to the previous window's previous window.
| Refresh current listing.  
|
|  
|-
|-
| <code>ReplaceWindowAndFocus(id1, id2,item1, id3,item2)</code>
| <code>Container.SetSortMethod(id)</code>
| Replace window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0).
| Change to the specified sort method. (For list of ID's see List of sort methods below)  
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>TakeScreenshot</code>
| <code>Container.SetViewMode(id)</code>
| Takes a Screenshot
| Set the current view mode (list, icons etc.) to the given container id.
|
|  
|-
|-
| <code>RunScript(script[,args]*)</code>
| <code>Container.SortDirection</code>
| Runs the python script. You must specify the full path to the script. If the script is an add-on, you can also execute it using its add-on id. As of 2007/02/24, all extra parameters are passed to the script as arguments and can be accessed by python using sys.argv
| Toggle the sort direction.  
|
|  
|-
| <code>StopScript(id)</code>
| Stop the script by ID or path, if running
| {{nowrap|v12 Addition}}
|-
|-
| <code>RunAppleScript(script[,args]*)</code>
| <code>Container.Update</code>
| Run the specified AppleScript command
| Update current listing. Send Container.Update(path,replace) to reset the path history.
|
|  
|-
|-
| <code>RunPlugin(plugin)</code>
| <code>Control.Message(id,message,[windowid])</code>
| Runs the plugin. Full path must be specified. Does not work for folder plugins
| Sends a given message to a control in a given window (or active window if omitted). Messages can be movedown, moveup, pagedown, pageup, click.  
|
|  
|-
|-
| <code>RunAddon(id)</code>
| <code>Control.Move(id,offset)</code>
| Runs the specified plugin/script
| Will make a Container with the "id" specified in the command move focus by "offset".
|
|  
|-
|-
| <code>NotifyAll</code>
| <code>Control.SetFocus(id,position)</code>
| Notify all connected clients
| Will make a list with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>Extract</code>
| <code>Dialog.Close(dialog[,force])</code>
| Extracts a specified archive to an optionally specified 'absolute' path.  
| Close a dialog. Set force to true to bypass animations. Use (all,true) to close all opened dialogs at once.  
|
|  
|-
|-
| <code>PlayMedia(media[,isdir][,1],[playoffset=xx])</code>
| <code>EjectTray()</code>
| Plays the media. This can be a playlist, music, or video file, directory, plugin or an Url. The optional parameter ",isdir" can be used for playing a directory. ",1" will start a video in a preview window, instead of fullscreen. If media is a playlist, you can use playoffset=xx where xx is the position to start playback from.
| Either opens or closes the DVD tray, depending on its current state
|
|  
|-
|-
| <code>Seek(seconds)</code>
| <code>exportlibrary(music,false,filepath)</code>
| Seeks to the specified relative amount of seconds within the current playing media. A negative value will seek backward and a positive value forward.
| The music library will be exported to a single file stored at filepath location.  
| {{nowrap|v15 Addition}}
|  
|-
|-
| <code>ShowPicture(picture)</code>
| <code>exportlibrary(video,true,thumbs,overwrite,actorthumbs)</code>
| Show a picture by its file path/url.
| The video library is exported to multiple files with the given options. Here thumbs, overwrite and actorthumbs are boolean values (true or false).  
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>SlideShow(dir [,recursive, [not]random])</code>
| <code>Extract</code>
| Starts a slideshow of pictures in the folder dir.  Optional parameters are "recursive", and "random" or "notrandom" parameters.  The "recursive" parameter starts a recursive slideshow, adding images from sub-folders.  The "random" and "notrandom" parameters override the Randomize setting found in the pictures media window.
| Extracts a specified archive to an optionally specified 'absolute' path.  
|
|  
|-
|-
| <code>RecursiveSlideShow(dir)</code>
| <code>Help</code>
| Run a slideshow from the specified directory, including all subdirs
| This help message (??? probably broken)
|
|  
|-
|-
| <code>ReloadSkin()</code>
| <code>Hibernate</code>
| Reloads the current skin – useful for Skinners to use after they upload modified skin files (saves power cycling)
| Hibernate (S4) the System
|
|  
|-
|-
| <code>UnloadSkin()</code>
| <code>InhibitIdleShutdown(true/false)</code>
| Unloads the current skin
| Prevent the system to shutdown on idle.
|
| {{nowrap|v12 Addition}}
|-
|-
| <code>Skin.ToggleDebug</code>
| <code>LIRC.Send(command)</code>
| Toggles skin debug info on/off
| Sends a command to LIRC, syntax is the lirc protocol without the newline. Example: LIRC.Send(SEND_ONCE Onkyo_RC-453S2 volup)
|
|  
|-
|-
| <code>RefreshRSS</code>
| <code>LIRC.Start</code>
| Reload RSS feeds from RSSFeeds.xml
| Adds Kodi as a LIRC client.  
|
|  
|-
|-
| <code>PlayerControl(command)</code>
| <code>LIRC.Stop</code>
| Allows control of music and videos. The command may be one of Play, Stop, Forward, Rewind, Next, Previous, BigSkipForward, BigSkipBackward, SmallSkipForward, SmallSkipBackward, Random, RandomOn, RandomOff, Repeat, RepeatOne, RepeatAll, RepeatOff, Partymode(music) or Partymode(video) or Partymode(path to .xsp file), and Record. Play will either pause, resume, or stop ffwding or rewinding.  Random toggles random playback and Repeat cycles through the repeat modes (these both take an optional second parameter, Notify, that notifies the user of the new state). Partymode(music/video) toggles the appropriate partymode, defaults to music if no parameter is given, besides the default music or video partymode you can also pass a path to a custom smartplaylist (.xsp) as parameter.
| Removes Kodi as a LIRC client.  
|
|  
|-
|-
| <code>Playlist.PlayOffset</code>
| <code>LoadProfile(profilename,[prompt])</code>
| Start playing from a particular offset in the playlist
| Load the specified profile. If prompt is not specified, and a password would be required for the requested profile, this command will silently fail. If promp' is specified and a password is required, a password dialog will be shown.
|
|  
|-
|-
| <code>Playlist.Clear</code>
| <code>Mastermode</code>
| Clear the current playlist
| Runs Kodi in master mode
|
|  
|-
|-
| <code>EjectTray()</code>
| <code>Minimize</code>
| Either opens or closes the DVD tray, depending on its current state
| Minimizes Kodi
|
|  
|-
|-
| <code>AlarmClock(name,command,time[,silent,loop])</code>
| <code>Mute</code>
| Pops up a dialog asking for the length of time for the alarm (unless the parameter time is specified), and starts a timer. When the timer runs out, it'll execute the <span class="nobr">built-in</span> command (the parameter command) if it is specified, otherwise it'll pop up an alarm notice. Add silent to hide the alarm notification. Add loop for the alarm to execute the command each time the specified time interval expires.
| Mutes (or unmutes) the volume.  
|
|  
|-
|-
| <code>CancelAlarm(name[,silent])</code>
| <code>NextChannelGroup</code>
| Cancel a running alarm. Set silent to true to hide the alarm notification.  
| Navigate to the next PVR channel group (in DialogPVRChannelsOSD.xml)
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>Action(action[,window])</code>
| <code>NextStereoMode</code>
| Executes an action (same as in keymap) for the given window or the active window if the parameter window is omitted. The parameter window can either be the window's id, or in the case of a standard window, the window's name. [[Window IDs|See here for a list of window names, and their respective ids.]]
| Changes the stereo mode of the GUI to the next available mode.
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>Notification(header,message[,time,image])</code>
| <code>Notification(header,message[,time,image])</code>
| Will display a notification dialog with the specified header and message, in addition you can set the length of time it displays in milliseconds and a icon image.
| Will display a notification dialog with the specified header and message, in addition you can set the length of time it displays in milliseconds and a icon image.  
|
|  
|-
|-
| <code>PlayDVD</code>
| <code>NotifyAll</code>
| Will play the inserted CD or DVD media from the <span class="nobr">DVD-ROM</span> drive.
| Notify all connected clients
|
| {{nowrap|v13 Addition}}
|-
| <code>PageDown</code>
| Send a page down event to the pagecontrol with given id.  
|  
|-
|-
| <code>RipCD</code>
| <code>PageUp</code>
| Will rip the inserted CD from the <span class="nobr">DVD-ROM</span> drive.
| Send a page up event to the pagecontrol with given id.  
|
|  
|-
|-
| <code>Skin.ToggleSetting(setting)</code>
| <code>PlayDVD</code>
| Toggles the skin setting ?setting? for use with [[Conditional Visibility|conditional visibility tags]] containing Skin.HasSetting(setting).
| Will play the inserted CD or DVD media from the DVD-ROM drive.  
|
|  
|-
|-
| <code>Skin.SetString(string[,value])</code>
| <code>PlayerControl(command)</code>
| Pops up a keyboard dialog and allows the user to input a string which can be used in a label control elsewhere in the skin via the [[InfoLabels|info tag]] Skin.String(string). If the value parameter is specified, then the keyboard dialog does not pop up, and the string is set directly.
| Allows control of music and videos. The command may be one of Play, Stop, Forward, Rewind, Next, Previous, BigSkipForward, BigSkipBackward, SmallSkipForward, SmallSkipBackward, Random, RandomOn, RandomOff, Repeat, RepeatOne, RepeatAll, RepeatOff, Partymode(music) or Partymode(video) or Partymode(path to .xsp file), and Record. Play will either pause, resume, or stop ffwding or rewinding. Random toggles random playback and Repeat cycles through the repeat modes (these both take an optional second parameter, Notify, that notifies the user of the new state). Partymode(music/video) toggles the appropriate partymode, defaults to music if no parameter is given, besides the default music or video partymode you can also pass a path to a custom smartplaylist (.xsp) as parameter.  
|
|  
|-
|-
| <code>Skin.SetNumeric(numeric[,value])</code>
| <code>Playlist.Clear</code>
| Pops up a keyboard dialog and allows the user to input a numerical.
| Clear the current playlist
|
|  
|-
|-
| <code>Skin.SetPath(string[,value])</code>
| <code>Playlist.PlayOffset</code>
| Pops up a folder browser and allows the user to select a folder of images  to be used in a multi image control else where in the skin via the [[InfoLabels|info tag]] Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the path is set directly.
| Start playing from a particular offset in the playlist
|
|  
|-
|-
| <code>Skin.Theme</code>
| <code>PlayMedia(media[,isdir][,1],[playoffset=xx])</code>
| Cycles the skin theme. Skin.theme(-1) will go backwards.
| Plays the media. This can be a playlist, music, or video file, directory, plugin or an Url. The optional parameter ",isdir" can be used for playing a directory. ",1" will start a video in a preview window, instead of fullscreen. If media is a playlist, you can use playoffset=xx where xx is the position to start playback from.  
|
|  
|-
|-
| <code>Skin.SetImage(string[,value,path])</code>
| <code>PlayWith()</code>
| Pops up a file browser and allows the user to select an image file to be used in an image control elsewhere in the skin via the [[InfoLabels|info tag]] Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly. the path option allows you to open the file browser in the specified folder.
| Play the selected item with the specified player core.  
|
|  
|-
|-
| <code>Skin.SetLargeImage(string[,value])</code>
| <code>Powerdown</code>
| Pops up a file browser and allows the user to select an large image file to be used in an image control else where in the skin via the [[InfoLabels|info tag]] Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly.
| Powerdown system
|
|  
|-
|-
| <code>Skin.SetFile(string,mask,folderpath)</code>
| <code>PreviousChannelGroup</code>
| Pops up a folder browser and allows the user to select a file off the hard-disk to be used else where in the skin via the [[InfoLabels|info tag]] Skin.String(string). If the mask parameter is specified, then the file browser will only search for the extension specified (.avi,.mp3,.m3u,.png,.bmp,etc.,etc.). To use multiple extensions separate them using "|" minus quotes. If the folderpath parameter is set the file browser will start in that folder.
| Navigate to the previous PVR channel group (in DialogPVRChannelsOSD.xml)
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>Skin.SetAddon(string,type)</code>
| <code>PreviousStereoMode</code>
| Pops up a select dialog and allows the user to select an add-on of the given type to be used elsewhere in the skin via the info tag Skin.String(string). The most common types are ''xbmc.addon.video'', ''xbmc.addon.audio'', ''xbmc.addon.image'' and ''xbmc.addon.executable''.
| Changes the stereo mode of the GUI to the previous available mode.
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>Skin.SetBool(setting)</code>
| <code>PVR.SearchMissingChannelIcons</code>
| Sets the skin setting ?setting? to true, for use with the [[Conditional Visibility|conditional visibility tags]] containing Skin.HasSetting(setting). The settings are saved <span class="nobr">per-skin</span> in settings.xml just like all the other Kodi settings.
| Will start a search for missing channel icons
|
| {{nowrap|v16 Addition}}
|-
|-
| <code>Skin.Reset(setting)</code>
| <code>Quit</code>
| Resets the skin setting ?setting?. If ?setting? is a bool setting (i.e. set via SetBool or ToggleSetting) then the setting is reset to false. If ?setting? is a string (Set via SetString, SetImage, or SetPath) then it is set to empty.
| Quits Kodi
|
|  
|-
|-
| <code>Skin.ResetSettings</code>
| <code>Reboot</code>
| Resets all the above skin settings to their defaults (toggles all set to false, strings all set to empty.)
| Cold reboots the system (power cycle)  
|
|  
|-
|-
| <code>Mute</code>
| <code>RecursiveSlideShow(dir)</code>
| Mutes (or unmutes) the volume.
| Run a slideshow from the specified directory, including all subdirs
|
|  
|-
|-
| <code>SetVolume(percent[,showvolumebar])</code>
| <code>RefreshRSS</code>
| Sets the volume to the percentage specified. Optionally, show the Volume Dialog in Kodi when setting the volume.
| Reload RSS feeds from RSSFeeds.xml
|
|  
|-
|-
| <code>Dialog.Close(dialog[,force])</code>
| <code>ReloadSkin()</code>
| Close a dialog. Set force to true to bypass animations. Use (all,true) to close all opened dialogs at once.
| Reloads the current skin – useful for Skinners to use after they upload modified skin files (saves power cycling)  
|
|  
|-
|-
| <code>System.LogOff</code>
| <code>ReplaceWindow(window,dir)
| Log off current user.
| Replaces the current window with the given window. This is the same as ActivateWindow() but it doesn't update the window history list, so when you go back from the new window it will not return to the previous window, rather will return to the previous window's previous window.  
|
|  
|-
|-
| <code>System.Exec</code>
| <code>ReplaceWindowAndFocus(id1, id2,item1, id3,item2)</code>
| Execute shell commands.
| Replace window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0).
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>System.ExecWait</code>
| <code>Reset</code>
| Execute shell commands and freezes Kodi until shell is closed.
| Reset the system (same as reboot)
|
|  
|-
|-
| <code>Resolution</code>
| <code>Resolution</code>
| Change Kodi's Resolution.
| Change Kodi's Resolution.  
|
|  
|-
|-
| <code>SetFocus(id,position)</code>
| <code>RestartApp</code>
| Will make a container with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)
| Restarts Kodi (only implemented under Windows and Linux)  
|
|  
|-
|-
| <code>UpdateLibrary(database,[path])</code>
| <code>RipCD</code>
| Takes either "video" or "music" as a parameter to begin updating the corresponding database. For "video" you can additionally specify a specific path to be scanned.
| Will rip the inserted CD from the DVD-ROM drive.  
|
|  
|-
|-
| <code>CleanLibrary(database)</code>
| <code>RunAddon(id)</code>
| This funtion will perform a number of 'cleanup' tasks on your video database and can be run if you have moved, deleted or renamed files. Takes either "video" or "music" as a parameter to begin cleaning the corresponding database.
| Runs the specified plugin/script
|
|  
|-
|-
| <code>exportlibrary(music,false,filepath)</code>
| <code>RunAppleScript(script[,args]*)</code>
| The music library will be exported to a single file stored at filepath location.
| Run the specified AppleScript command
|
|  
|-
|-
| <code>exportlibrary(video,true,thumbs,overwrite,actorthumbs)</code>
| <code>RunPlugin(plugin)</code>
| The video library is exported to multiple files with the given options. Here thumbs, overwrite and actorthumbs are boolean values (true or false).
| Runs the plugin. Full path must be specified. Does not work for folder plugins
|
|  
|-
|-
| <code>PageDown</code>
| <code>RunScript(script[,args]*)</code>
| Send a page down event to the pagecontrol with given id.
| Runs the python script. You must specify the full path to the script. If the script is an add-on, you can also execute it using its add-on id. As of 2007/02/24, all extra parameters are passed to the script as arguments and can be accessed by python using sys.argv
|
|  
|-
|-
| <code>PageUp</code>
| <code>Seek(seconds)</code>
| Send a page up event to the pagecontrol with given id.
| Seeks to the specified relative amount of seconds within the current playing media. A negative value will seek backward and a positive value forward.
|
| {{nowrap|v15 Addition}}
|-
|-
| <code>Container.Refresh</code>
| <code>SendClick(windowid,id)</code>
| Refresh current listing.
| Sends a click to a control in a given window (or active window if omitted).  
|
|  
|-
|-
| <code>Container.Update</code>
| <code>SetFocus(id,position)</code>
| Update current listing. Send Container.Update(path,replace) to reset the path history.
| Will make a container with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)  
|
|  
|-
|-
| <code>Container.NextViewMode</code>
| <code>SetGUILanguage</code>
| Select the next view mode.
| Set GUI Language
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>Container.PreviousViewMode</code>
| <code>SetProperty(key,value[,id])</code>
| Select the previous view mode.
| Sets a window property for the current window (key,value), or the specified window (key,value,id).  
|
|  
|-
|-
| <code>Container.SetViewMode(id)</code>
| <code>SetStereoMode</code>
| Set the current view mode (list, icons etc.) to the given container id.
| Changes the stereo mode of the GUI. Params can be: toggle, next, previous, select, tomono or any of the supported stereomodes (off, split_vertical, split_horizontal, row_interleaved, hardware_based, anaglyph_cyan_red, anaglyph_green_magenta, monoscopic)
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>Container.NextSortMethod</code>
| <code>settingslevelchange</code>
| Change to the next sort method.
| Toggles the visible settings (in SettingsCategory.xml) between 'basic', 'standard', 'advanced and 'expert'
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>Container.PreviousSortMethod</code>
| <code>SetVolume(percent[,showvolumebar])</code>
| Change to the previous sort method.
| Sets the volume to the percentage specified. Optionally, show the Volume Dialog in Kodi when setting the volume.  
|
|  
|-
|-
| <code>Container.SetSortMethod(id)</code>
| <code>ShowPicture(picture)</code>
| Change to the specified sort method. (For list of ID's see '''List of sort methods''' below)
| Show a picture by its file path/url.
|
| {{nowrap|v13 Addition}}
|-
|-
| <code>Container.SortDirection</code>
| <code>ShutDown</code>
| Toggle the sort direction.
| Trigger default Shutdown action defined in System Settings
|
|  
|-
|-
| <code>Control.Move(id,offset)</code>
| <code>Skin.Reset(setting)</code>
| Will make a Container with the "id" specified in the command move focus by "offset".
| Resets the skin setting ?setting?. If ?setting? is a bool setting (i.e. set via SetBool or ToggleSetting) then the setting is reset to false. If ?setting? is a string (Set via SetString, SetImage, or SetPath) then it is set to empty.  
|
|  
|-
|-
| <code>Control.SetFocus(id,position)</code>
| <code>Skin.ResetSettings</code>
| Will make a list with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)
| Resets all the above skin settings to their defaults (toggles all set to false, strings all set to empty.)  
|
|  
|-
|-
| <code>Control.Message(id,message,[windowid])</code>
| <code>Skin.SetAddon(string,type)</code>
| Sends a given message to a control in a given window (or active window if omitted). Messages can be movedown, moveup, pagedown, pageup, click.
| Pops up a select dialog and allows the user to select an add-on of the given type to be used elsewhere in the skin via the info tag Skin.String(string). The most common types are xbmc.addon.video, xbmc.addon.audio, xbmc.addon.image and xbmc.addon.executable.  
|
|  
|-
|-
| <code>SendClick(windowid,id)</code>
| <code>Skin.SetBool(setting)</code>
| Sends a click to a control in a given window (or active window if omitted).
| Sets the skin setting ?setting? to true, for use with the conditional visibility tags containing Skin.HasSetting(setting). The settings are saved per-skin in settings.xml just like all the other Kodi settings.  
|
|  
|-
|-
| <code>LoadProfile(profilename,[prompt])</code>
| <code>Skin.SetFile(string,mask,folderpath)</code>
| Load the specified profile. If prompt is not specified, and a password would be required for the requested profile, this command will silently fail. If promp' is specified and a password is required, a password dialog will be shown.
| Pops up a folder browser and allows the user to select a file off the hard-disk to be used else where in the skin via the info tag Skin.String(string). If the mask parameter is specified, then the file browser will only search for the extension specified (.avi,.mp3,.m3u,.png,.bmp,etc.,etc.). To use multiple extensions separate them using "|" minus quotes. If the folderpath parameter is set the file browser will start in that folder.  
|
|  
|-
|-
| <code>SetProperty(key,value[,id])</code>
| <code>Skin.SetImage(string[,value,path])</code>
| Sets a window property for the current window (key,value), or the specified window (key,value,id).
| Pops up a file browser and allows the user to select an image file to be used in an image control elsewhere in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly. the path option allows you to open the file browser in the specified folder.  
|
|  
|-
|-
| <code>ClearProperty(key[,id])</code>
| <code>Skin.SetLargeImage(string[,value])</code>
| Clears a window property for the current focused window/dialog(key), or the specified window (key,id).
| Pops up a file browser and allows the user to select an large image file to be used in an image control else where in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly.  
|
|  
|-
|-
| <code>PlayWith()</code>
| <code>Skin.SetNumeric(numeric[,value])</code>
| Play the selected item with the specified player core.
| Pops up a keyboard dialog and allows the user to input a numerical.  
|
|  
|-
|-
| <code>WakeOnLan(''mac'')</code>
| <code>Skin.SetPath(string[,value])</code>
| Sends the wake-up packet to the broadcast address for the specified MAC address (Format: FF:FF:FF:FF:FF:FF or FF-FF-FF-FF-FF-FF).
| Pops up a folder browser and allows the user to select a folder of images to be used in a multi image control else where in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the path is set directly.  
|
|  
|-
|-
| <code>Addon.Default.OpenSettings</code>
| <code>Skin.SetString(string[,value])</code>
| Open a settings dialog for the default addon of the given type
| Pops up a keyboard dialog and allows the user to input a string which can be used in a label control elsewhere in the skin via the info tag Skin.String(string). If the value parameter is specified, then the keyboard dialog does not pop up, and the string is set directly.
|
|  
|-
|-
| <code>Addon.Default.Set</code>
| <code>Skin.Theme</code>
| Open a select dialog to allow choosing the default addon of the given type
| Cycles the skin theme. Skin.theme(-1) will go backwards.
|
|  
|-
|-
| <code>Addon.OpenSettings(id)</code>
| <code>Skin.ToggleDebug</code>
| Open a settings dialog for the addon of the given id
| Toggles skin debug info on/off
|
|  
|-
|-
| <code>UpdateAddonRepos</code>
| <code>Skin.ToggleSetting(setting)</code>
| Triggers a forced update of enabled add-on repositories.
| Toggles the skin setting ?setting? for use with conditional visibility tags containing Skin.HasSetting(setting).  
|
|  
|-
|-
| <code>UpdateLocalAddons</code>
| <code>SlideShow(dir [,recursive, [not]random])</code>
| Triggers a scan of local add-on directories.
| Starts a slideshow of pictures in the folder dir. Optional parameters are "recursive", and "random" or "notrandom" parameters. The "recursive" parameter starts a recursive slideshow, adding images from sub-folders. The "random" and "notrandom" parameters override the Randomize setting found in the pictures media window.  
|
|  
|-
|-
| <code>ToggleDPMS</code>
| <code>StartAndroidActivity(package,[intent,dataType,dataURI])</code>
| Toggle DPMS mode manually
| Launch an Android native app with the given package name. Optional parms (in order): intent, dataType, dataURI.
|
|-
| <code>CECToggleState</code>
| Toggle state of playing device via a CEC peripheral
| {{nowrap|v13 Addition}}
| {{nowrap|v13 Addition}}
|-
|-
| <code>CECActivateSource</code>
| <code>StartPVRManager</code>
| Wake up playing device via a CEC peripheral
| (Re)Starts the PVR manager
| {{nowrap|v13 Addition}}
| {{nowrap|v12 Addition}}
|-
|-
| <code>CECStandby</code>
| <code>StereoModeToMono</code>
| Put playing device on standby via a CEC peripheral
| Toggle the stereoscopic mode to 2D.
| {{nowrap|v13 Addition}}
| {{nowrap|v13 Addition}}
|-
|-
| <code>Weather.Refresh</code>
| <code>StopPVRManager</code>
| Force weather data refresh
| Stops the PVR manager
|
| {{nowrap|v12 Addition}}
|-
|-
| <code>Weather.LocationNext</code>
| <code>StopScript(id)</code>
| Switch to next weather location
| Stop the script by ID or path, if running
|
| {{nowrap|v12 Addition}}
|-
|-
| <code>Weather.LocationPrevious</code>
| <code>Suspend</code>
| Switch to previous weather location
| Suspends (S3 / S1 depending on bios setting) the System
|
|  
|-
|-
| <code>Weather.LocationSet</code>
| <code>System.Exec</code>
| Switch to given weather location (parameter can be 1-3)
| Execute shell commands.
|
|  
|-
|-
| <code>LIRC.Stop</code>
| <code>System.ExecWait</code>
| Removes Kodi as a LIRC client.
| Execute shell commands and freezes Kodi until shell is closed.  
|
|  
|-
|-
| <code>LIRC.Start</code>
| <code>System.LogOff</code>
| Adds Kodi as a LIRC client.
| Log off current user.  
|
|  
|-
|-
| <code>LIRC.Send(command)</code>
| <code>TakeScreenshot</code>
| Sends a command to LIRC, syntax is the lirc protocol without the newline.<br />Example: LIRC.Send(SEND_ONCE Onkyo_RC-453S2 volup)
| Takes a Screenshot
|
|  
|-
|-
| <code>VideoLibrary.Search</code>
| Brings up a search dialog which will search the library
|
|-
| <code>ToggleDebug</code>
| <code>ToggleDebug</code>
| Enables/disables debug mode
| Enables/disables debug mode
| {{nowrap|v12 Addition}}
| {{nowrap|v12 Addition}}
|-  
|-
| <code>ToggleDirtyRegionVisualization</code>
| <code>ToggleDirtyRegionVisualization</code>
| makes [[dirty regions]] visible for debugging proposes.
| makes dirty regions visible for debugging proposes.
| v16 addition
|-
| <code>StartPVRManager</code>
| (Re)Starts the PVR manager
| {{nowrap|v12 Addition}}
|-
| <code>StopPVRManager</code>
| Stops the PVR manager
| {{nowrap|v12 Addition}}
|-
| <code>PVR.SearchMissingChannelIcons</code>
| Will start a search for missing channel icons
| {{nowrap|v16 Addition}}
| {{nowrap|v16 Addition}}
|-
|-
| <code>{{nowrap|StartAndroidActivity(package,[intent,dataType,dataURI])}}</code>
| <code>ToggleDPMS</code>
| Launch an Android native app with the given package name.  Optional parms (in order): intent, dataType, dataURI.
| Toggle DPMS mode manually
|
|-
| <code>ToggleStereoMode</code>
| Toggle the stereoscopic mode of the GUI (on/off).
| {{nowrap|v13 Addition}}
| {{nowrap|v13 Addition}}
|-
|-
| <code>PreviousChannelGroup</code>
| <code>UnloadSkin()</code>
| Navigate to the previous PVR channel group (in DialogPVRChannelsOSD.xml)
| Unloads the current skin
| {{nowrap|v13 Addition}}
|
|-
| <code>UpdateAddonRepos</code>
| Triggers a forced update of enabled add-on repositories.
|
|-
| <code>UpdateLibrary(database,[path])</code>
| Takes either "video" or "music" as a parameter to begin updating the corresponding database. For "video" you can additionally specify a specific path to be scanned.
|  
|-
|-
| <code>NextChannelGroup</code>
| <code>UpdateLocalAddons</code>
| Navigate to the next PVR channel group (in DialogPVRChannelsOSD.xml)
| Triggers a scan of local add-on directories.  
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>settingslevelchange</code>
| <code>VideoLibrary.Search</code>
| Toggles the visible settings (in SettingsCategory.xml) between 'basic', 'standard', 'advanced and 'expert'
| Brings up a search dialog which will search the library
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>SetStereoMode</code>
| <code>WakeOnLan(mac)</code>
| Changes the stereo mode of the GUI. Params can be: toggle, next, previous, select, tomono or any of the supported stereomodes (off, split_vertical, split_horizontal, row_interleaved, hardware_based, anaglyph_cyan_red, anaglyph_green_magenta, monoscopic)
| Sends the wake-up packet to the broadcast address for the specified MAC address (Format: FF:FF:FF:FF:FF:FF or FF-FF-FF-FF-FF-FF).
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>NextStereoMode</code>
| <code>Weather.LocationNext</code>
| Changes the stereo mode of the GUI to the next available mode.
| Switch to next weather location
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>PreviousStereoMode</code>
| <code>Weather.LocationPrevious</code>
| Changes the stereo mode of the GUI to the previous available mode.
| Switch to previous weather location
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>ToggleStereoMode</code>
| <code>Weather.LocationSet</code>
| Toggle the stereoscopic mode of the GUI (on/off).
| Switch to given weather location (parameter can be 1-3)  
| {{nowrap|v13 Addition}}
|  
|-
|-
| <code>StereoModeToMono</code>
| <code>Weather.Refresh</code>
| Toggle the stereoscopic mode to 2D.
| Force weather data refresh
| {{nowrap|v13 Addition}}
|  
|}
|}
<section end="functions" />
<section end="functions" />

Revision as of 11:03, 2 December 2015

Home icon grey.png   ▶ Python development
▶ Add-on development
▶ Skinning
▶ Built-in scripting ▶ List of built-in functions

Skins can use built-in functions with the <onclick> or <onfocus> tag. Scripts can call built-in functions with xbmc.executebuiltin(function, block).

The latest up-to-date list of built-in functions can be found in the source code files in [1].

In addition to the following list, for most <onclick> and <onfocus> button actions in the skin you can also use the functions from Keyboard.xml.

Example:
<onclick>VolumeUp</onclick>
<onclick>VolumeDown</onclick>

You can use parameters with all media windows, as can be seen here:

List of functions

Function Description Version
Action(action[,window]) Executes an action (same as in keymap) for the given window or the active window if the parameter window is omitted. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See here for a list of window names, and their respective ids.
ActivateScreensaver Starts the screensaver v13 Addition
ActivateWindow(window[,dir,return]) Opens the given window. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See here for a list of window names, and their respective ids. If, furthermore, the window is Music, Video, Pictures, or Program files, then the optional dir parameter specifies which folder Kodi should default to once the window is opened. This must be a source as specified in sources.xml, or a subfolder of a valid source. For some windows (MusicLibrary and VideoLibrary), the return parameter may be specified, which indicates that Kodi should use this folder as the "root" of the level, and thus the "parent directory" action from within this folder will return the user to where they were prior to the window activating.
ActivateWindowAndFocus(id1, id2,item1, id3,item2) Activate window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0). v12 Addition
Addon.Default.OpenSettings Open a settings dialog for the default addon of the given type
Addon.Default.Set Open a select dialog to allow choosing the default addon of the given type
Addon.OpenSettings(id) Open a settings dialog for the addon of the given id
AlarmClock(name,command,time[,silent,loop]) Pops up a dialog asking for the length of time for the alarm (unless the parameter time is specified), and starts a timer. When the timer runs out, it'll execute the built-in command (the parameter command) if it is specified, otherwise it'll pop up an alarm notice. Add silent to hide the alarm notification. Add loop for the alarm to execute the command each time the specified time interval expires.
AllowIdleShutdown Allow the system to shutdown on idle. v12 Addition
CancelAlarm(name[,silent]) Cancel a running alarm. Set silent to true to hide the alarm notification.
CECActivateSource Wake up playing device via a CEC peripheral v13 Addition
CECStandby Put playing device on standby via a CEC peripheral v13 Addition
CECToggleState Toggle state of playing device via a CEC peripheral v13 Addition
CleanLibrary(database) This funtion will perform a number of 'cleanup' tasks on your video database and can be run if you have moved, deleted or renamed files. Takes either "video" or "music" as a parameter to begin cleaning the corresponding database.
ClearProperty(key[,id]) Clears a window property for the current focused window/dialog(key), or the specified window (key,id).
Container.NextSortMethod Change to the next sort method.
Container.NextViewMode Select the next view mode.
Container.PreviousSortMethod Change to the previous sort method.
Container.PreviousViewMode Select the previous view mode.
Container.Refresh Refresh current listing.
Container.SetSortMethod(id) Change to the specified sort method. (For list of ID's see List of sort methods below)
Container.SetViewMode(id) Set the current view mode (list, icons etc.) to the given container id.
Container.SortDirection Toggle the sort direction.
Container.Update Update current listing. Send Container.Update(path,replace) to reset the path history.
Control.Message(id,message,[windowid]) Sends a given message to a control in a given window (or active window if omitted). Messages can be movedown, moveup, pagedown, pageup, click.
Control.Move(id,offset) Will make a Container with the "id" specified in the command move focus by "offset".
Control.SetFocus(id,position) Will make a list with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)
Dialog.Close(dialog[,force]) Close a dialog. Set force to true to bypass animations. Use (all,true) to close all opened dialogs at once.
EjectTray() Either opens or closes the DVD tray, depending on its current state
exportlibrary(music,false,filepath) The music library will be exported to a single file stored at filepath location.
exportlibrary(video,true,thumbs,overwrite,actorthumbs) The video library is exported to multiple files with the given options. Here thumbs, overwrite and actorthumbs are boolean values (true or false).
Extract Extracts a specified archive to an optionally specified 'absolute' path.
Help This help message (??? probably broken)
Hibernate Hibernate (S4) the System
InhibitIdleShutdown(true/false) Prevent the system to shutdown on idle. v12 Addition
LIRC.Send(command) Sends a command to LIRC, syntax is the lirc protocol without the newline. Example: LIRC.Send(SEND_ONCE Onkyo_RC-453S2 volup)
LIRC.Start Adds Kodi as a LIRC client.
LIRC.Stop Removes Kodi as a LIRC client.
LoadProfile(profilename,[prompt]) Load the specified profile. If prompt is not specified, and a password would be required for the requested profile, this command will silently fail. If promp' is specified and a password is required, a password dialog will be shown.
Mastermode Runs Kodi in master mode
Minimize Minimizes Kodi
Mute Mutes (or unmutes) the volume.
NextChannelGroup Navigate to the next PVR channel group (in DialogPVRChannelsOSD.xml) v13 Addition
NextStereoMode Changes the stereo mode of the GUI to the next available mode. v13 Addition
Notification(header,message[,time,image]) Will display a notification dialog with the specified header and message, in addition you can set the length of time it displays in milliseconds and a icon image.
NotifyAll Notify all connected clients v13 Addition
PageDown Send a page down event to the pagecontrol with given id.
PageUp Send a page up event to the pagecontrol with given id.
PlayDVD Will play the inserted CD or DVD media from the DVD-ROM drive.
PlayerControl(command) Allows control of music and videos. The command may be one of Play, Stop, Forward, Rewind, Next, Previous, BigSkipForward, BigSkipBackward, SmallSkipForward, SmallSkipBackward, Random, RandomOn, RandomOff, Repeat, RepeatOne, RepeatAll, RepeatOff, Partymode(music) or Partymode(video) or Partymode(path to .xsp file), and Record. Play will either pause, resume, or stop ffwding or rewinding. Random toggles random playback and Repeat cycles through the repeat modes (these both take an optional second parameter, Notify, that notifies the user of the new state). Partymode(music/video) toggles the appropriate partymode, defaults to music if no parameter is given, besides the default music or video partymode you can also pass a path to a custom smartplaylist (.xsp) as parameter.
Playlist.Clear Clear the current playlist
Playlist.PlayOffset Start playing from a particular offset in the playlist
PlayMedia(media[,isdir][,1],[playoffset=xx]) Plays the media. This can be a playlist, music, or video file, directory, plugin or an Url. The optional parameter ",isdir" can be used for playing a directory. ",1" will start a video in a preview window, instead of fullscreen. If media is a playlist, you can use playoffset=xx where xx is the position to start playback from.
PlayWith() Play the selected item with the specified player core.
Powerdown Powerdown system
PreviousChannelGroup Navigate to the previous PVR channel group (in DialogPVRChannelsOSD.xml) v13 Addition
PreviousStereoMode Changes the stereo mode of the GUI to the previous available mode. v13 Addition
PVR.SearchMissingChannelIcons Will start a search for missing channel icons v16 Addition
Quit Quits Kodi
Reboot Cold reboots the system (power cycle)
RecursiveSlideShow(dir) Run a slideshow from the specified directory, including all subdirs
RefreshRSS Reload RSS feeds from RSSFeeds.xml
ReloadSkin() Reloads the current skin – useful for Skinners to use after they upload modified skin files (saves power cycling)
ReplaceWindow(window,dir) Replaces the current window with the given window. This is the same as ActivateWindow() but it doesn't update the window history list, so when you go back from the new window it will not return to the previous window, rather will return to the previous window's previous window.
ReplaceWindowAndFocus(id1, id2,item1, id3,item2) Replace window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0). v13 Addition
Reset Reset the system (same as reboot)
Resolution Change Kodi's Resolution.
RestartApp Restarts Kodi (only implemented under Windows and Linux)
RipCD Will rip the inserted CD from the DVD-ROM drive.
RunAddon(id) Runs the specified plugin/script
RunAppleScript(script[,args]*) Run the specified AppleScript command
RunPlugin(plugin) Runs the plugin. Full path must be specified. Does not work for folder plugins
RunScript(script[,args]*) Runs the python script. You must specify the full path to the script. If the script is an add-on, you can also execute it using its add-on id. As of 2007/02/24, all extra parameters are passed to the script as arguments and can be accessed by python using sys.argv
Seek(seconds) Seeks to the specified relative amount of seconds within the current playing media. A negative value will seek backward and a positive value forward. v15 Addition
SendClick(windowid,id) Sends a click to a control in a given window (or active window if omitted).
SetFocus(id,position) Will make a container with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)
SetGUILanguage Set GUI Language v13 Addition
SetProperty(key,value[,id]) Sets a window property for the current window (key,value), or the specified window (key,value,id).
SetStereoMode Changes the stereo mode of the GUI. Params can be: toggle, next, previous, select, tomono or any of the supported stereomodes (off, split_vertical, split_horizontal, row_interleaved, hardware_based, anaglyph_cyan_red, anaglyph_green_magenta, monoscopic) v13 Addition
settingslevelchange Toggles the visible settings (in SettingsCategory.xml) between 'basic', 'standard', 'advanced and 'expert' v13 Addition
SetVolume(percent[,showvolumebar]) Sets the volume to the percentage specified. Optionally, show the Volume Dialog in Kodi when setting the volume.
ShowPicture(picture) Show a picture by its file path/url. v13 Addition
ShutDown Trigger default Shutdown action defined in System Settings
Skin.Reset(setting) Resets the skin setting ?setting?. If ?setting? is a bool setting (i.e. set via SetBool or ToggleSetting) then the setting is reset to false. If ?setting? is a string (Set via SetString, SetImage, or SetPath) then it is set to empty.
Skin.ResetSettings Resets all the above skin settings to their defaults (toggles all set to false, strings all set to empty.)
Skin.SetAddon(string,type) Pops up a select dialog and allows the user to select an add-on of the given type to be used elsewhere in the skin via the info tag Skin.String(string). The most common types are xbmc.addon.video, xbmc.addon.audio, xbmc.addon.image and xbmc.addon.executable.
Skin.SetBool(setting) Sets the skin setting ?setting? to true, for use with the conditional visibility tags containing Skin.HasSetting(setting). The settings are saved per-skin in settings.xml just like all the other Kodi settings.
Skin.SetFile(string,mask,folderpath) " minus quotes. If the folderpath parameter is set the file browser will start in that folder.
Skin.SetImage(string[,value,path]) Pops up a file browser and allows the user to select an image file to be used in an image control elsewhere in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly. the path option allows you to open the file browser in the specified folder.
Skin.SetLargeImage(string[,value]) Pops up a file browser and allows the user to select an large image file to be used in an image control else where in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly.
Skin.SetNumeric(numeric[,value]) Pops up a keyboard dialog and allows the user to input a numerical.
Skin.SetPath(string[,value]) Pops up a folder browser and allows the user to select a folder of images to be used in a multi image control else where in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the path is set directly.
Skin.SetString(string[,value]) Pops up a keyboard dialog and allows the user to input a string which can be used in a label control elsewhere in the skin via the info tag Skin.String(string). If the value parameter is specified, then the keyboard dialog does not pop up, and the string is set directly.
Skin.Theme Cycles the skin theme. Skin.theme(-1) will go backwards.
Skin.ToggleDebug Toggles skin debug info on/off
Skin.ToggleSetting(setting) Toggles the skin setting ?setting? for use with conditional visibility tags containing Skin.HasSetting(setting).
SlideShow(dir [,recursive, [not]random]) Starts a slideshow of pictures in the folder dir. Optional parameters are "recursive", and "random" or "notrandom" parameters. The "recursive" parameter starts a recursive slideshow, adding images from sub-folders. The "random" and "notrandom" parameters override the Randomize setting found in the pictures media window.
StartAndroidActivity(package,[intent,dataType,dataURI]) Launch an Android native app with the given package name. Optional parms (in order): intent, dataType, dataURI. v13 Addition
StartPVRManager (Re)Starts the PVR manager v12 Addition
StereoModeToMono Toggle the stereoscopic mode to 2D. v13 Addition
StopPVRManager Stops the PVR manager v12 Addition
StopScript(id) Stop the script by ID or path, if running v12 Addition
Suspend Suspends (S3 / S1 depending on bios setting) the System
System.Exec Execute shell commands.
System.ExecWait Execute shell commands and freezes Kodi until shell is closed.
System.LogOff Log off current user.
TakeScreenshot Takes a Screenshot
ToggleDebug Enables/disables debug mode v12 Addition
ToggleDirtyRegionVisualization makes dirty regions visible for debugging proposes. v16 Addition
ToggleDPMS Toggle DPMS mode manually
ToggleStereoMode Toggle the stereoscopic mode of the GUI (on/off). v13 Addition
UnloadSkin() Unloads the current skin
UpdateAddonRepos Triggers a forced update of enabled add-on repositories.
UpdateLibrary(database,[path]) Takes either "video" or "music" as a parameter to begin updating the corresponding database. For "video" you can additionally specify a specific path to be scanned.
UpdateLocalAddons Triggers a scan of local add-on directories.
VideoLibrary.Search Brings up a search dialog which will search the library
WakeOnLan(mac) Sends the wake-up packet to the broadcast address for the specified MAC address (Format: FF:FF:FF:FF:FF:FF or FF-FF-FF-FF-FF-FF).
Weather.LocationNext Switch to next weather location
Weather.LocationPrevious Switch to previous weather location
Weather.LocationSet Switch to given weather location (parameter can be 1-3)
Weather.Refresh Force weather data refresh


Removed functions

  • LastFM.Love - Removed in v13 Gotham
  • LastFM.Ban - Removed in v13 Gotham
  • LCD.Suspend - Removed in v13 Gotham
  • LCD.Resume - Removed in v13 Gotham

List of sort methods

These ID's can be used with the Container.SetSortMethod(id) function as listed here:

ID Description
1 Name
2 Date
3 Size
4 File
5 Path
6 DriveType
7 Title
8 TrackNumber
9 Time
10 Artist
11 Album
12 AlbumType
13 Genre
14 Country
15 Year
16 Rating
17 Votes
18 Top250
19 ProgramCount
20 PlaylistOrder
21 EpisodeNumber
22 Season
23 NumberOfEpisodes
24 NumberOfWatchedEpisodes
25 TvShowStatus
26 TvShowTitle
27 SortTitle
28 ProductionCode
29 MPAA
30 VideoResolution
31 VideoCodec
32 VideoAspectRatio
33 AudioChannels
34 AudioCodec
35 AudioLanguage
36 SubtitleLanguage
37 Studio
38 DateAdded
39 LastPlayed
40 Playcount
41 Listeners
42 Bitrate
43 Random
44 Channel
45 ChannelNumber
46 DateTaken

See also