![]() |
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Function | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Addon.Default.OpenSettings(extensionpoint) | Open a settings dialog for the default addon of the given type (extensionpoint)
| ||||||||||||
Addon.Default.Set(extensionpoint) | Open a select dialog to allow choosing the default addon of the given type (extensionpoint)
| ||||||||||||
Addon.OpenSettings(id) | Open a settings dialog for the addon of the given id
| ||||||||||||
EnableAddon(id) | Enable the specified plugin/script
| ||||||||||||
InstallFromZip | Opens the "Install from zip" dialog if "Unknown sources" is enabled. Prompts the warning message if not. | ||||||||||||
RunAddon(id[,opt]) | 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
| ||||||||||||
StopScript(id) | Stop the script by ID or path, if running
| ||||||||||||
UpdateAddonRepos | Triggers a forced update of enabled add-on repositories. | ||||||||||||
UpdateLocalAddons | Triggers a scan of local add-on directories. |
Function | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StartAndroidActivity(package,[intent,dataType,dataURI,flags,extras,action,category,className]) | Launch an Android native app with the given package name. Optional parms (in order): intent, dataType, dataURI, flags, extras, action, category, className.
|
Function | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Extract(url [, dest]) | Extracts a specified archive to an optionally specified 'absolute' path.
| |||||||||
Mute | Mutes (or unmutes) the volume. | |||||||||
NotifyAll(sender, data [, json]) | Notify all connected clients
| |||||||||
SetVolume(percent[,showvolumebar]) | Sets the volume to the percentage specified. Optionally, show the Volume Dialog in Kodi when setting the volume.
| |||||||||
ToggleDebug | Toggles debug mode on/off | |||||||||
ToggleDPMS | Toggle DPMS mode manually | |||||||||
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).
|
Function | Description |
---|---|
CECActivateSource | Wake up playing device via a CEC peripheral |
CECStandby | Put playing device on standby via a CEC peripheral |
CECToggleState | Toggle state of playing device via a CEC peripheral |
Function | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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.
| |||||||||||||||
CancelAlarm(name[,silent]) | Cancel a running alarm. Set silent to true to hide the alarm notification.
| |||||||||||||||
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.
Example: The following example will create an alarmclock named
| |||||||||||||||
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), a third parameter (return) 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).
| |||||||||||||||
ClearProperty(key[,id]) | Clears a window property for the current focused window/dialog(key), or the specified window (key,id).
| |||||||||||||||
Dialog.Close(dialog[,force]) | Close a dialog. Set force to true to bypass animations. Use (all,true) to close all opened dialogs at once.
| |||||||||||||||
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.
| |||||||||||||||
RefreshRSS | Reload RSS feeds from RSSFeeds.xml | |||||||||||||||
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).
| |||||||||||||||
Resolution(resIdent) | Change Kodi's Resolution (default is 4x3). param[in] resIdent A resolution identifier.
| |||||||||||||||
SetGUILanguage(lang) | Set GUI Language
| |||||||||||||||
SetProperty(key,value[,id]) | Sets a window property for the current window (key,value), or the specified window (key,value,id).
| |||||||||||||||
SetStereoMode(ident) | 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)
| |||||||||||||||
TakeScreenshot(url[,sync) | Takes a Screenshot
| |||||||||||||||
ToggleDirtyRegionVisualization | makes dirty regions visible for debugging proposes. |
Function | Description | ||||||
---|---|---|---|---|---|---|---|
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(url) | 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(url,[replace]) | Update current listing. Send Container.Update(path,replace) to reset the path history.
|
Function | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
control.message(controlId, action[, windowId]) | Send a given message to a control within a given window
| |||||||||
control.move(id, offset) | Tells the specified control to 'move' to another entry specified by offset
| |||||||||
control.setfocus(controlId[, subitemId]) | Change current focus to a different control id
| |||||||||
control.setvisible(controlId) | Set the control id to visible
| |||||||||
pageup(controlId) | Send a page up event to the pagecontrol with given id
| |||||||||
sendclick(controlId [, windowId]) | Send a click message from the given control to the given window
| |||||||||
setfocus | Change current focus to a different control id
|
Function | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cleanlibrary(type) | Clean the video/music library
| ||||||||||||||||||||||||||||||||||||
exportlibrary(type [, exportSingeFile, exportThumbs, overwrite, exportActorThumbs]) | Export the video/music library
| ||||||||||||||||||||||||||||||||||||
exportlibrary2(library, exportFiletype, path [, unscraped][, overwrite][, artwork][, skipnfo] / [, albums][, albumartists][, songartists][, otherartists][, actorthumbs]) | Export the video/music library with extended parameters
| ||||||||||||||||||||||||||||||||||||
updatelibrary([type, suppressDialogs]) | Update the selected library (music or video)
| ||||||||||||||||||||||||||||||||||||
videolibrary.search | Brings up a search dialog which will search the library |
Function | Description |
---|---|
EjectTray | Either opens or closes the DVD tray, depending on its current state. |
RipCD | Will rip the inserted CD from the DVD-ROM drive. |
Function | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RecursiveSlideShow(dir) | Run a slideshow from the specified directory, including all subdirs.
| ||||||||||||||||||
ShowPicture(picture) | Display a picture by file path.
| ||||||||||||||||||
SlideShow(dir [,recursive, [not]random]) | Starts a slideshow of pictures in the folder dir. Optional parameters are recursive, and random or notrandom slideshow, adding images from sub-folders. The random and notrandom parameters override the Randomize setting found in the pictures media window.
|
Function | Description | ||||||
---|---|---|---|---|---|---|---|
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 prompt is specified and a password is required, a password dialog will be shown.
| ||||||
Mastermode | Runs Kodi in master mode | ||||||
System.LogOff | Log off current user. |
Function | Description |
---|---|
PVR.SearchMissingChannelIcons | Will start a search for missing channel icons |
PVR.ToggleRecordPlayingChannel | Will toggle recording on playing channel, if any |
PVR.SeekPercentage | Performs a seek to the given percentage in timeshift buffer, if timeshifting is supported |
PVR.EpgGridControl | Control PVR Guide window's EPG grid |
Function | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ReloadSkin(reload) | Reloads the current skin – useful for Skinners to use after they upload modified skin files (saves power cycling)
| ||||||||||||||||||
UnloadSkin() | Unloads the current skin | ||||||||||||||||||
Skin.Reset(setting) | Resets the skin 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.SelectBool(header, label1|setting1, label2|setting2, ...) | Pops up select dialog to select between multiple skin setting options.
If the users confirms a (single) selection label in the select dialog, the paired skinbool is set to true and all others in the list are set to false. Multi-select is not available. Example:
| ||||||||||||||||||
Skin.SetBool(setting[,value]) | Sets the skin 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[,url]) | 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.SetColor(string,header[,colorfile,selectedcolor]) | Pops up a color selection dialog and allows the user to select a color to be used to define the color of a label control or as a colordiffuse value for a texture elsewhere in the skin via the info tag Skin.String(string) . Skinners can optionally set the color that needs to be preselected in the dialog by specifying the hex value of this color. Also optionally, skinners can include their own color definition file. If not specified, the default colorfile included with Kodi will be used.
| ||||||||||||||||||
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) . The value of the setting can also be compared to another value using the info bool Skin.String(string, value) . If the value parameter is specified, then the keyboard dialog does not pop up, and the string is set directly.
| ||||||||||||||||||
Skin.Theme(cycle) | 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 for use with conditional visibility tags containing Skin.HasSetting(setting) .
| ||||||||||||||||||
Skin.TimerStart(timer) | Starts the timer with name
|
Function | Description | |||
---|---|---|---|---|
ActivateScreensaver | Starts the screensaver | |||
InhibitScreensaver(yesNo) | Inhibit the screensaver
| |||
Hibernate | Hibernate (S4) the System | |||
InhibitIdleShutdown(true/false) | Prevent the system to shutdown on idle.
| |||
Minimize | Minimizes Kodi | |||
Powerdown | Powerdown system | |||
Quit | Quits Kodi | |||
Reboot | Cold reboots the system (power cycle) | |||
Reset | Reset the system (same as reboot) | |||
Restart | Restart the system (same as reboot) | |||
RestartApp | Restarts Kodi (only implemented under Windows and Linux) | |||
ShutDown | Trigger default Shutdown action defined in System Settings | |||
Suspend | Suspends (S3 / S1 depending on bios setting) the System | |||
System.Exec(exec) | Execute shell commands
| |||
System.ExecWait(exec) | Execute shell commands and freezes Kodi until shell is closed
|
Function | Description | |||
---|---|---|---|---|
Weather.Refresh | Force weather data refresh. | |||
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).
|