| 
    Kodi Documentation 22.0
    
   Kodi is an open source media player and entertainment hub. 
   | 
 
General functions on Kodi. More...
Topics | |
| InfoTagGame | |
| Kodi's game info tag class.  | |
| InfoTagMusic | |
| Kodi's music info tag class.  | |
| InfoTagPicture | |
| Kodi's picture info tag class.  | |
| InfoTagRadioRDS | |
| Kodi's radio RDS info tag class.  | |
| Actor | |
| Actor class used in combination with InfoTagVideo.  | |
| VideoStreamDetail | |
| Video stream details class used in combination with InfoTagVideo.  | |
| AudioStreamDetail | |
| Audio stream details class used in combination with InfoTagVideo.  | |
| SubtitleStreamDetail | |
| Subtitle stream details class used in combination with InfoTagVideo.  | |
| InfoTagVideo | |
| Kodi's video info tag class.  | |
| Keyboard | |
| Kodi's keyboard class.  | |
| Monitor | |
| Kodi's monitor class.  | |
| Player | |
| Kodi's player.  | |
| PlayList | |
| Kodi's Play List class.  | |
| RenderCapture | |
| Kodi's render capture.  | |
Functions | |
| log (...) | |
 
 | |
| shutdown () | |
 
 | |
| restart () | |
 
 | |
| executescript (...) | |
 
 | |
| executebuiltin (...) | |
 
 | |
| executeJSONRPC (...) | |
 
 | |
| sleep (...) | |
 
 | |
| getLocalizedString (...) | |
 
 | |
| getSkinDir () | |
 
 | |
| getLanguage (...) | |
 
 | |
| getIPAddress () | |
 
 | |
| getDVDState () | |
 
 | |
| getFreeMem () | |
 
 | |
| getInfoLabel (...) | |
 
 | |
| getInfoImage (...) | |
 
 | |
| playSFX (...) | |
 
 | |
| stopSFX () | |
 
 | |
| enableNavSounds (...) | |
 
 | |
| getCondVisibility (...) | |
 
 | |
| getGlobalIdleTime () | |
 
 | |
| getCacheThumbName (...) | |
 
 | |
| getCleanMovieTitle (...) | |
 
 | |
| getRegion (...) | |
 
 | |
| getSupportedMedia (...) | |
 
 | |
| skinHasImage (...) | |
 
 | |
| startServer (...) | |
 
 | |
| audioSuspend () | |
 
 | |
| audioResume () | |
 
 | |
| getUserAgent () | |
 
 | |
| convertLanguage (...) | |
 
 | |
General functions on Kodi.
Offers classes and functions that provide information about the media currently playing and that allow manipulation of the media player (such as starting a new song). You can also find system information using the functions available in this library.
| audioResume | ( | ) | 
Function:  xbmc.audioResume() Example:
| audioSuspend | ( | ) | 
Function:  xbmc.audioSuspend() Example:
| convertLanguage | ( | ... | ) | 
Function:  xbmc.convertLanguage(language, format) Returns the given language converted to the given format as a string.
| language | string either as name in English, two letter code (ISO 639-1), or three letter code (ISO 639-2/T(B) | ||||||||
| format | format of the returned language string 
  | 
Example:
| enableNavSounds | ( | ... | ) | 
Function:  xbmc.enableNavSounds(yesNo) | yesNo | bool - enable (True) or disable (False) nav sounds | 
Example:
| executebuiltin | ( | ... | ) | 
Function:  xbmc.executebuiltin(function) | function | string - builtin function to execute. | 
| wait | [opt] bool - If Kodi should wait for the builtin function execution to finish (default False) | 
Example:
| executeJSONRPC | ( | ... | ) | 
Function:  xbmc.executeJSONRPC(jsonrpccommand) | jsonrpccommand | string - jsonrpc command to execute. | 
Example:
| executescript | ( | ... | ) | 
Function:  xbmc.executescript(script) | script | string - script filename to execute. | 
Example:
| getCacheThumbName | ( | ... | ) | 
Function:  xbmc.getCacheThumbName(path) | path | string - path to file | 
Example:
| getCleanMovieTitle | ( | ... | ) | 
Function:  xbmc.getCleanMovieTitle(path[, usefoldername]) | path | string - String to clean | 
| usefoldername | [opt] bool - use folder names (defaults to false) | 
Example:
| getCondVisibility | ( | ... | ) | 
Function:  xbmc.getCondVisibility(condition) | condition | string - condition to check | 
Example:
| getDVDState | ( | ) | 
Function:  xbmc.getDVDState() | Value | Name | 
|---|---|
| 1 | xbmc.DRIVE_NOT_READY | 
| 16 | xbmc.TRAY_OPEN | 
| 64 | xbmc.TRAY_CLOSED_NO_MEDIA | 
| 96 | xbmc.TRAY_CLOSED_MEDIA_PRESENT | 
Example:
| getFreeMem | ( | ) | 
Function:  xbmc.getFreeMem() Example:
| getGlobalIdleTime | ( | ) | 
Function:  xbmc.getGlobalIdleTime() Example:
| getInfoImage | ( | ... | ) | 
Function:  xbmc.getInfoImage(infotag) | infotag | string - infotag for value you want returned | 
List of InfoTags - http://kodi.wiki/view/InfoLabels
Example:
| getInfoLabel | ( | ... | ) | 
Function:  xbmc.getInfoLabel(infotag) | infotag | string - infoTag for value you want returned. | 
Example:
| getIPAddress | ( | ) | 
Function:  xbmc.getIPAddress() Example:
| getLanguage | ( | ... | ) | 
Function:  xbmc.getLanguage([format], [region]) | format | [opt] format of the returned language string 
  | ||||||||
| region | [opt] append the region delimited by "-" of the language (setting) to the returned language string | 
Example:
| getLocalizedString | ( | ... | ) | 
Function:  xbmc.getLocalizedString(id) | id | integer - id# for string you want to localize. | 
\language\{yourlanguage}\ for which id you need for a string.Example:
| getRegion | ( | ... | ) | 
Function:  xbmc.getRegion(id) | id | string - id of setting to return | 
Example:
| getSkinDir | ( | ) | 
Function:  xbmc.getSkinDir() Example:
| getSupportedMedia | ( | ... | ) | 
Function:  xbmc.getSupportedMedia(media) | media | string - media type | 
Example:
| getUserAgent | ( | ) | 
| log | ( | ... | ) | 
Function:  xbmc.log(msg[, level]) | msg | string - text to output. | ||||||||||||
| level | [opt] integer - log level to output at. (default=LOGDEBUG) 
  | 
LOGDEBUG as the default logging level and to use conservative logging (log only if needed). Excessive logging makes it harder to debug kodi itself.Logging in kodi has a global configuration level that controls how text is written to the log. This global logging behaviour can be changed in the GUI (Settings -> System -> Logging) (debug toggle) or furthered configured in advancedsettings (loglevel setting).
Text is written to the log for the following conditions:
LOGINFO, LOGWARNING, LOGERROR and LOGFATAL) - Default kodi behaviourLOGNOTICE to LOGDEBUG LOGNOTICE (use LOGINFO) and LOGSEVERE (use LOGFATAL)Example:
| playSFX | ( | ... | ) | 
Function:  xbmc.playSFX(filename,[useCached]) | filename | string - filename of the wav file to play | 
| useCached | [opt] bool - False = Dump any previously cached wav associated with filename | 
Example:
| restart | ( | ) | 
Function:  xbmc.restart() Example:
| shutdown | ( | ) | 
Function:  xbmc.shutdown() Example:
| skinHasImage | ( | ... | ) | 
Function:  xbmc.skinHasImage(image) | image | string - image filename | 
Example:
| sleep | ( | ... | ) | 
Function:  xbmc.sleep(time) | time | integer - number of msec to sleep. | 
| PyExc_TypeError | If time is not an integer. | 
Example:
| startServer | ( | ... | ) | 
Function:  xbmc.startServer(typ, bStart, bWait) | typ | integer - use SERVER_* constants
  | ||||||||||||||||
| bStart | bool - start (True) or stop (False) a server | 
Example:
| stopSFX | ( | ) | 
Function:  xbmc.stopSFX() Example: